mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-08 16:43:47 +01:00
Add celery support to docker config
This commit is contained in:
parent
a45df0e173
commit
7d52931a20
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.7
|
FROM python:3.6
|
||||||
|
|
||||||
WORKDIR /home/cdb
|
WORKDIR /home/cdb
|
||||||
|
|
||||||
@ -14,6 +14,3 @@ COPY setup.py ./setup.py
|
|||||||
COPY app app
|
COPY app app
|
||||||
COPY migrations migrations
|
COPY migrations migrations
|
||||||
COPY config.prod.cfg ./config.prod.cfg
|
COPY config.prod.cfg ./config.prod.cfg
|
||||||
|
|
||||||
EXPOSE 5123
|
|
||||||
ENTRYPOINT ["./runprodguni.sh"]
|
|
||||||
|
@ -6,24 +6,31 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "./data/db:/var/lib/postgresql/data"
|
- "./data/db:/var/lib/postgresql/data"
|
||||||
env_file:
|
env_file:
|
||||||
- db.env
|
- config.env
|
||||||
networks:
|
|
||||||
- db_nw
|
redis:
|
||||||
|
image: 'redis:3.0-alpine'
|
||||||
|
command: redis-server
|
||||||
|
volumes:
|
||||||
|
- './data/redis:/data'
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
|
command: ./runprodguni.sh
|
||||||
ports:
|
ports:
|
||||||
- 5123:5123
|
- 5123:5123
|
||||||
volumes:
|
volumes:
|
||||||
- "./data/uploads:/home/app/public/uploads"
|
- "./data/uploads:/home/cdb/app/public/uploads"
|
||||||
networks:
|
|
||||||
- db_nw
|
|
||||||
- web_nw
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
- redis
|
||||||
|
|
||||||
networks:
|
worker:
|
||||||
db_nw:
|
build: .
|
||||||
driver: bridge
|
command: celery -A app.tasks.celery worker
|
||||||
web_nw:
|
env_file:
|
||||||
driver: bridge
|
- config.env
|
||||||
|
volumes:
|
||||||
|
- "./data/uploads:/home/cdb/app/public/uploads"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
Loading…
Reference in New Issue
Block a user