2020-03-22 18:21:19 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
2020-05-18 03:20:51 +00:00
|
|
|
nginx:
|
2020-10-05 21:22:37 +00:00
|
|
|
image: nginx:latest
|
2020-05-18 03:20:51 +00:00
|
|
|
ports:
|
2020-10-16 19:55:32 +00:00
|
|
|
- 80:80
|
|
|
|
- 443:443
|
2020-05-18 03:20:51 +00:00
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
volumes:
|
2020-10-05 21:22:37 +00:00
|
|
|
- ./nginx:/etc/nginx/conf.d
|
2020-10-16 19:55:32 +00:00
|
|
|
- ./certbot/conf:/etc/nginx/ssl
|
|
|
|
- ./certbot/data:/var/www/certbot
|
2020-05-18 03:20:51 +00:00
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
2020-10-16 19:55:32 +00:00
|
|
|
certbot:
|
|
|
|
image: certbot/certbot:latest
|
|
|
|
command: certonly --webroot --webroot-path=/var/www/certbot --email ${EMAIL} --agree-tos --no-eff-email -d ${DOMAIN} -d www.${DOMAIN}
|
|
|
|
volumes:
|
|
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
|
|
- ./certbot/logs:/var/log/letsencrypt
|
|
|
|
- ./certbot/data:/var/www/certbot
|
2020-03-22 18:21:19 +00:00
|
|
|
db:
|
2020-10-28 22:56:25 +00:00
|
|
|
build: postgres-docker
|
2020-10-16 20:22:09 +00:00
|
|
|
env_file: .env
|
2020-03-22 18:21:19 +00:00
|
|
|
volumes:
|
2020-03-27 20:04:06 +00:00
|
|
|
- pgdata:/var/lib/postgresql/data
|
2020-10-28 22:56:25 +00:00
|
|
|
- backups:/backups
|
2020-03-22 21:33:26 +00:00
|
|
|
networks:
|
|
|
|
- main
|
2020-03-22 18:21:19 +00:00
|
|
|
web:
|
|
|
|
build: .
|
|
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
|
|
volumes:
|
2020-03-22 21:33:26 +00:00
|
|
|
- .:/app
|
2020-05-18 03:20:51 +00:00
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
2020-03-22 18:21:19 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
2020-03-22 21:33:26 +00:00
|
|
|
- celery_worker
|
|
|
|
networks:
|
|
|
|
- main
|
2020-06-17 16:53:44 +00:00
|
|
|
ports:
|
|
|
|
- 8000:8000
|
2020-03-31 23:31:33 +00:00
|
|
|
redis:
|
|
|
|
image: redis
|
2020-10-27 19:30:34 +00:00
|
|
|
command: redis-server --requirepass ${REDIS_PASSWORD}
|
2020-10-28 18:37:28 +00:00
|
|
|
volumes:
|
2020-10-28 18:51:25 +00:00
|
|
|
- ./redis.conf:/etc/redis/redis.conf
|
2020-10-16 20:22:09 +00:00
|
|
|
env_file: .env
|
2020-03-31 23:31:33 +00:00
|
|
|
ports:
|
2020-10-16 19:55:32 +00:00
|
|
|
- 6379:6379
|
2020-03-22 21:33:26 +00:00
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
restart: on-failure
|
|
|
|
celery_worker:
|
2020-10-16 20:22:09 +00:00
|
|
|
env_file: .env
|
2020-03-22 21:33:26 +00:00
|
|
|
build: .
|
|
|
|
networks:
|
|
|
|
- main
|
2020-09-17 21:13:44 +00:00
|
|
|
command: celery -A celerywyrm worker -l info
|
2020-03-22 21:33:26 +00:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
2020-10-01 17:20:40 +00:00
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
2020-03-22 21:33:26 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
2020-03-31 23:31:33 +00:00
|
|
|
- redis
|
|
|
|
restart: on-failure
|
2020-10-31 18:18:40 +00:00
|
|
|
flower:
|
2020-11-08 02:25:17 +00:00
|
|
|
build: .
|
|
|
|
command: flower --port=8888
|
2020-10-31 18:18:40 +00:00
|
|
|
env_file: .env
|
|
|
|
environment:
|
|
|
|
- CELERY_BROKER_URL=${CELERY_BROKER}
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
restart: on-failure
|
|
|
|
ports:
|
|
|
|
- 8888:8888
|
2020-03-22 18:21:19 +00:00
|
|
|
volumes:
|
|
|
|
pgdata:
|
2020-10-28 22:56:25 +00:00
|
|
|
backups:
|
2020-05-18 03:20:51 +00:00
|
|
|
static_volume:
|
|
|
|
media_volume:
|
2020-03-22 21:33:26 +00:00
|
|
|
networks:
|
|
|
|
main:
|