2
0
Fork 0
bookwyrm/docker-compose.yml

113 lines
2.4 KiB
YAML
Raw Normal View History

2020-03-22 11:21:19 -07:00
version: '3'
services:
2021-03-04 19:44:12 +01:00
nginx:
image: nginx:latest
ports:
2021-03-20 20:47:53 -07:00
- 80:80
- 443:443
2021-03-04 19:44:12 +01:00
depends_on:
- web
networks:
- main
volumes:
- ./nginx:/etc/nginx/conf.d
2021-03-20 20:47:53 -07:00
- ./certbot/conf:/etc/nginx/ssl
- ./certbot/data:/var/www/certbot
2021-03-04 19:44:12 +01:00
- static_volume:/app/static
- media_volume:/app/images
2021-03-20 20:47:53 -07:00
certbot:
image: certbot/certbot:latest
2021-04-13 13:12:10 -07:00
command: bash ./certbot.sh
2021-03-20 20:47:53 -07:00
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/logs:/var/log/letsencrypt
- ./certbot/data:/var/www/certbot
2021-03-04 19:44:12 +01:00
db:
2021-03-20 20:47:53 -07:00
build: postgres-docker
2021-03-04 19:44:12 +01:00
env_file: .env
2021-03-20 20:47:53 -07:00
entrypoint: /bookwyrm-entrypoint.sh
command: cron postgres
2021-03-04 19:44:12 +01:00
volumes:
- pgdata:/var/lib/postgresql/data
2021-03-20 20:47:53 -07:00
- backups:/backups
2021-03-04 19:44:12 +01:00
networks:
- main
ports:
- 5432:5432
2021-03-04 19:44:12 +01:00
web:
build: .
env_file: .env
2021-03-20 20:47:53 -07:00
command: gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000
2021-03-04 19:44:12 +01:00
volumes:
- .:/app
- static_volume:/app/static
- media_volume:/app/images
depends_on:
- db
- celery_worker
- redis_activity
2021-03-04 19:44:12 +01:00
networks:
- main
ports:
- 8000:8000
redis_activity:
2021-03-22 10:44:42 -07:00
image: redis
2021-04-15 16:41:50 -07:00
command: redis-server --requirepass ${REDIS_ACTIVITY_PASSWORD} --appendonly yes
volumes:
- ./redis.conf:/etc/redis/redis.conf
- redis_activity_data:/data
env_file: .env
networks:
- main
restart: on-failure
redis_broker:
image: redis
2021-04-15 16:41:50 -07:00
command: redis-server --requirepass ${REDIS_BROKER_PASSWORD} --appendonly yes
2021-03-20 20:47:53 -07:00
volumes:
- ./redis.conf:/etc/redis/redis.conf
- redis_broker_data:/data
2021-03-04 19:44:12 +01:00
env_file: .env
ports:
- 6379:6379
networks:
- main
restart: on-failure
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
- redis_broker
2021-03-04 19:44:12 +01:00
restart: on-failure
flower:
build: .
2021-05-17 00:03:51 -05:00
command: flower --port=${FLOWER_PORT} --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD}
2021-03-04 19:44:12 +01:00
env_file: .env
environment:
- CELERY_BROKER_URL=${CELERY_BROKER}
networks:
- main
depends_on:
- db
- redis_broker
2021-03-04 19:44:12 +01:00
restart: on-failure
ports:
- 8888:8888
2020-03-22 11:21:19 -07:00
volumes:
2021-03-04 19:44:12 +01:00
pgdata:
2021-03-20 20:47:53 -07:00
backups:
2021-03-04 19:44:12 +01:00
static_volume:
media_volume:
2021-04-15 14:55:08 -07:00
redis_broker_data:
redis_activity_data:
2020-03-22 14:33:26 -07:00
networks:
2021-03-04 19:44:12 +01:00
main: