Add celery support to docker config

This commit is contained in:
rubenwardy 2019-01-09 22:29:05 +00:00
parent a45df0e173
commit 7d52931a20
2 changed files with 20 additions and 16 deletions

@ -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"]

@ -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