[odrs-web/UBI8: 5/6] Add docker-compose




commit d45a6b297bbc07fb8fb83eb519726f3b19bb2e25
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Mon Apr 25 11:05:32 2022 +0200

    Add docker-compose

 .gitignore         |  3 +++
 docker-compose.yml | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index 76803bf..b8b183b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+**/__pycache__
+.bash_history
 .coverage
 env
 htmlcov
+odrs/static/ratings.json*
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..cb3fb58
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,36 @@
+version: "3"
+
+services:
+  odrs:
+    image: odrs
+    build:
+      dockerfile: Dockerfile
+      context: .
+    restart: unless-stopped
+    user: root
+    environment:
+      - ODRS_REVIEWS_SECRET=1
+      - SQLALCHEMY_DATABASE_URI=mysql+pymysql://odrs:odrspasswd@db/odrs?charset=utf8mb4
+    ports:
+      - "8080:8080"
+    depends_on:
+      - db
+    volumes:
+      - .:/opt/app-root/src:z
+
+  db:
+    image: docker.io/library/mariadb:10.2
+    ports:
+      - "3306:3306"
+    environment:
+      - MARIADB_DATABASE=odrs
+      - MARIADB_USER=odrs
+      - MARIADB_PASSWORD=odrspasswd
+      - MARIADB_ROOT_PASSWORD=rootpasswd
+
+  nginx:
+    image: docker.io/nginxinc/nginx-unprivileged:latest
+    volumes:
+      - ./nginx.conf:/etc/nginx/nginx.conf
+    ports:
+      - "8000:8000"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]