2020-03-22 18:21:19 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
2021-03-04 18:44:12 +00:00
|
|
|
nginx:
|
|
|
|
image: nginx:latest
|
|
|
|
ports:
|
|
|
|
- 1333:80
|
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
volumes:
|
|
|
|
- ./nginx:/etc/nginx/conf.d
|
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
|
|
|
db:
|
|
|
|
image: postgres
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
- main
|
2021-03-30 13:28:13 +00:00
|
|
|
ports:
|
|
|
|
- 5432:5432
|
2021-03-04 18:44:12 +00:00
|
|
|
web:
|
|
|
|
build: .
|
|
|
|
env_file: .env
|
|
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- celery_worker
|
2021-03-22 17:44:42 +00:00
|
|
|
- redis_activity
|
2021-03-04 18:44:12 +00:00
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
ports:
|
|
|
|
- 8000:8000
|
2021-03-22 17:44:42 +00:00
|
|
|
redis_activity:
|
|
|
|
image: redis
|
2021-04-15 21:55:08 +00:00
|
|
|
command: ["redis-server", "--appendonly", "yes"]
|
2021-03-22 17:44:42 +00:00
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- 6378:6378
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
restart: on-failure
|
2021-04-15 21:55:08 +00:00
|
|
|
volumes:
|
|
|
|
- redis_activity_data:/data
|
2021-03-22 17:44:42 +00:00
|
|
|
redis_broker:
|
2021-03-04 18:44:12 +00:00
|
|
|
image: redis
|
2021-04-15 21:55:08 +00:00
|
|
|
command: ["redis-server", "--appendonly", "yes"]
|
2021-03-04 18:44:12 +00:00
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- 6379:6379
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
restart: on-failure
|
2021-04-15 21:55:08 +00:00
|
|
|
volumes:
|
|
|
|
- redis_broker_data:/data
|
2021-03-04 18:44:12 +00:00
|
|
|
celery_worker:
|
|
|
|
env_file: .env
|
|
|
|
build: .
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
command: celery -A celerywyrm worker -l info
|
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
|
|
|
depends_on:
|
|
|
|
- db
|
2021-03-22 17:44:42 +00:00
|
|
|
- redis_broker
|
2021-03-04 18:44:12 +00:00
|
|
|
restart: on-failure
|
|
|
|
flower:
|
|
|
|
build: .
|
|
|
|
command: flower --port=8888
|
|
|
|
env_file: .env
|
|
|
|
environment:
|
|
|
|
- CELERY_BROKER_URL=${CELERY_BROKER}
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
depends_on:
|
|
|
|
- db
|
2021-03-22 17:44:42 +00:00
|
|
|
- redis_broker
|
2021-03-04 18:44:12 +00:00
|
|
|
restart: on-failure
|
|
|
|
ports:
|
|
|
|
- 8888:8888
|
2020-03-22 18:21:19 +00:00
|
|
|
volumes:
|
2021-03-04 18:44:12 +00:00
|
|
|
pgdata:
|
|
|
|
static_volume:
|
|
|
|
media_volume:
|
2021-04-15 21:55:08 +00:00
|
|
|
redis_broker_data:
|
|
|
|
redis_activity_data:
|
2020-03-22 21:33:26 +00:00
|
|
|
networks:
|
2021-03-04 18:44:12 +00:00
|
|
|
main:
|