2
0
Fork 0
bookwyrm/docker-compose.yml

98 lines
2.5 KiB
YAML
Raw Normal View History

2020-03-22 11:21:19 -07:00
version: '3'
services:
nginx:
2020-10-05 14:22:37 -07:00
image: nginx:latest
ports:
2020-10-16 12:55:32 -07:00
- 80:80
- 443:443
depends_on:
- web
networks:
- main
volumes:
2020-10-05 14:22:37 -07:00
- ./nginx:/etc/nginx/conf.d
2020-10-16 12:55:32 -07:00
- ./certbot/conf:/etc/nginx/ssl
- ./certbot/data:/var/www/certbot
- static_volume:/app/static
- media_volume:/app/images
2020-10-16 12:55:32 -07: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}
#command: renew --webroot --webroot-path /var/www/certbot
2020-10-16 12:55:32 -07:00
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/logs:/var/log/letsencrypt
- ./certbot/data:/var/www/certbot
2020-03-22 11:21:19 -07:00
db:
build: postgres-docker
2020-10-16 13:22:09 -07:00
env_file: .env
entrypoint: /bookwyrm-entrypoint.sh
command: cron postgres
2020-03-22 11:21:19 -07:00
volumes:
- pgdata:/var/lib/postgresql/data
- backups:/backups
2020-03-22 14:33:26 -07:00
networks:
- main
2020-03-22 11:21:19 -07:00
web:
build: .
2020-11-08 12:14:57 -08:00
env_file: .env
2021-01-05 19:28:13 -08:00
command: gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000
2020-03-22 11:21:19 -07:00
volumes:
2020-03-22 14:33:26 -07:00
- .:/app
- static_volume:/app/static
- media_volume:/app/images
2020-03-22 11:21:19 -07:00
depends_on:
- db
2020-03-22 14:33:26 -07:00
- celery_worker
networks:
- main
ports:
- 8000:8000
redis:
image: redis
2020-10-27 12:30:34 -07:00
command: redis-server --requirepass ${REDIS_PASSWORD}
2020-10-28 11:37:28 -07:00
volumes:
2020-10-28 11:51:25 -07:00
- ./redis.conf:/etc/redis/redis.conf
2020-10-16 13:22:09 -07:00
env_file: .env
ports:
2020-10-16 12:55:32 -07:00
- 6379:6379
2020-03-22 14:33:26 -07:00
networks:
- main
restart: on-failure
celery_worker:
2020-10-16 13:22:09 -07:00
env_file: .env
2020-03-22 14:33:26 -07:00
build: .
networks:
- main
2020-09-17 14:13:44 -07:00
command: celery -A celerywyrm worker -l info
2020-03-22 14:33:26 -07:00
volumes:
- .:/app
2020-10-01 10:20:40 -07:00
- static_volume:/app/static
- media_volume:/app/images
2020-03-22 14:33:26 -07:00
depends_on:
- db
- redis
restart: on-failure
2020-10-31 11:18:40 -07:00
flower:
build: .
2021-01-05 12:52:10 -08:00
command: flower --port=8888 --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD}
2020-10-31 11:18:40 -07: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 11:21:19 -07:00
volumes:
pgdata:
backups:
static_volume:
media_volume:
2020-03-22 14:33:26 -07:00
networks:
main: