aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
-rw-r--r--docker-compose.yml31
2 files changed, 20 insertions, 16 deletions
diff --git a/Dockerfile b/Dockerfile
index 21f35ed..c91a69f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3.7
+FROM python:3.6
WORKDIR /home/cdb
@@ -14,6 +14,3 @@ COPY setup.py ./setup.py
COPY app app
COPY migrations migrations
COPY config.prod.cfg ./config.prod.cfg
-
-EXPOSE 5123
-ENTRYPOINT ["./runprodguni.sh"]
diff --git a/docker-compose.yml b/docker-compose.yml
index 685d4c5..4c2752e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,24 +6,31 @@ services:
volumes:
- "./data/db:/var/lib/postgresql/data"
env_file:
- - db.env
- networks:
- - db_nw
+ - config.env
+
+ redis:
+ image: 'redis:3.0-alpine'
+ command: redis-server
+ volumes:
+ - './data/redis:/data'
app:
build: .
+ command: ./runprodguni.sh
ports:
- 5123:5123
volumes:
- - "./data/uploads:/home/app/public/uploads"
- networks:
- - db_nw
- - web_nw
+ - "./data/uploads:/home/cdb/app/public/uploads"
depends_on:
- db
+ - redis
-networks:
- db_nw:
- driver: bridge
- web_nw:
- driver: bridge
+ worker:
+ build: .
+ command: celery -A app.tasks.celery worker
+ env_file:
+ - config.env
+ volumes:
+ - "./data/uploads:/home/cdb/app/public/uploads"
+ depends_on:
+ - redis