2020-03-22 18:21:19 +00:00
|
|
|
version: '3'
|
|
|
|
|
2023-04-04 01:21:11 +00:00
|
|
|
x-logging:
|
|
|
|
&default-logging
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "150m"
|
|
|
|
max-file: "2"
|
|
|
|
|
2020-03-22 18:21:19 +00:00
|
|
|
services:
|
2021-03-04 18:44:12 +00:00
|
|
|
nginx:
|
|
|
|
image: nginx:latest
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2022-05-09 09:00:28 +00:00
|
|
|
restart: unless-stopped
|
2021-03-04 18:44:12 +00:00
|
|
|
ports:
|
2022-11-24 06:11:59 +00:00
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
2021-03-04 18:44:12 +00:00
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
volumes:
|
|
|
|
- ./nginx:/etc/nginx/conf.d
|
2021-03-21 03:47:53 +00:00
|
|
|
- ./certbot/conf:/etc/nginx/ssl
|
|
|
|
- ./certbot/data:/var/www/certbot
|
2021-03-04 18:44:12 +00:00
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
2021-03-21 03:47:53 +00:00
|
|
|
certbot:
|
|
|
|
image: certbot/certbot:latest
|
2021-06-05 17:46:41 +00:00
|
|
|
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
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2021-03-21 03:47:53 +00:00
|
|
|
volumes:
|
|
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
|
|
- ./certbot/logs:/var/log/letsencrypt
|
|
|
|
- ./certbot/data:/var/www/certbot
|
2021-03-04 18:44:12 +00:00
|
|
|
db:
|
2021-03-21 03:47:53 +00:00
|
|
|
build: postgres-docker
|
2021-03-04 18:44:12 +00:00
|
|
|
env_file: .env
|
2021-03-21 03:47:53 +00:00
|
|
|
entrypoint: /bookwyrm-entrypoint.sh
|
|
|
|
command: cron postgres
|
2021-03-04 18:44:12 +00:00
|
|
|
volumes:
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
2021-03-21 03:47:53 +00:00
|
|
|
- backups:/backups
|
2021-03-04 18:44:12 +00:00
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
web:
|
|
|
|
build: .
|
|
|
|
env_file: .env
|
2021-03-21 03:47:53 +00:00
|
|
|
command: gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2021-03-04 18:44:12 +00:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- celery_worker
|
2021-03-25 18:00:37 +00:00
|
|
|
- redis_activity
|
2021-03-04 18:44:12 +00:00
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
ports:
|
2022-11-16 11:38:49 +00:00
|
|
|
- "8000"
|
2021-03-25 18:00:37 +00:00
|
|
|
redis_activity:
|
2021-03-22 17:44:42 +00:00
|
|
|
image: redis
|
2021-05-18 05:54:15 +00:00
|
|
|
command: redis-server --requirepass ${REDIS_ACTIVITY_PASSWORD} --appendonly yes --port ${REDIS_ACTIVITY_PORT}
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2021-03-25 18:00:37 +00:00
|
|
|
volumes:
|
|
|
|
- ./redis.conf:/etc/redis/redis.conf
|
2021-05-17 05:05:11 +00:00
|
|
|
- redis_activity_data:/data
|
2021-03-25 18:00:37 +00:00
|
|
|
env_file: .env
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
restart: on-failure
|
|
|
|
redis_broker:
|
|
|
|
image: redis
|
2021-05-18 05:54:15 +00:00
|
|
|
command: redis-server --requirepass ${REDIS_BROKER_PASSWORD} --appendonly yes --port ${REDIS_BROKER_PORT}
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2021-03-21 03:47:53 +00:00
|
|
|
volumes:
|
|
|
|
- ./redis.conf:/etc/redis/redis.conf
|
2021-05-17 05:05:11 +00:00
|
|
|
- redis_broker_data:/data
|
2021-03-04 18:44:12 +00:00
|
|
|
env_file: .env
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
restart: on-failure
|
|
|
|
celery_worker:
|
|
|
|
env_file: .env
|
|
|
|
build: .
|
|
|
|
networks:
|
|
|
|
- main
|
2023-02-20 20:58:41 +00:00
|
|
|
command: celery -A celerywyrm worker -l info -Q high_priority,medium_priority,low_priority,imports,broadcast
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2021-03-04 18:44:12 +00:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
|
|
|
depends_on:
|
|
|
|
- db
|
2021-03-25 18:00:37 +00:00
|
|
|
- redis_broker
|
2021-03-04 18:44:12 +00:00
|
|
|
restart: on-failure
|
2022-02-26 16:44:19 +00:00
|
|
|
celery_beat:
|
|
|
|
env_file: .env
|
|
|
|
build: .
|
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
command: celery -A celerywyrm beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2022-02-26 16:44:19 +00:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
|
|
|
- static_volume:/app/static
|
|
|
|
- media_volume:/app/images
|
|
|
|
depends_on:
|
|
|
|
- celery_worker
|
|
|
|
restart: on-failure
|
2021-03-04 18:44:12 +00:00
|
|
|
flower:
|
|
|
|
build: .
|
2022-12-06 12:58:05 +00:00
|
|
|
command: celery -A celerywyrm flower --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD} --url_prefix=flower
|
2023-04-04 01:21:11 +00:00
|
|
|
logging: *default-logging
|
2021-03-04 18:44:12 +00:00
|
|
|
env_file: .env
|
2021-05-24 04:49:12 +00:00
|
|
|
volumes:
|
|
|
|
- .:/app
|
2021-03-04 18:44:12 +00:00
|
|
|
networks:
|
|
|
|
- main
|
|
|
|
depends_on:
|
|
|
|
- db
|
2021-03-25 18:00:37 +00:00
|
|
|
- redis_broker
|
2021-03-04 18:44:12 +00:00
|
|
|
restart: on-failure
|
2022-02-12 22:06:18 +00:00
|
|
|
dev-tools:
|
2022-02-15 20:25:35 +00:00
|
|
|
build: dev-tools
|
2022-02-12 22:06:18 +00:00
|
|
|
env_file: .env
|
|
|
|
volumes:
|
2022-02-16 20:53:18 +00:00
|
|
|
- .:/app
|
2020-03-22 18:21:19 +00:00
|
|
|
volumes:
|
2021-03-04 18:44:12 +00:00
|
|
|
pgdata:
|
2021-03-21 03:47:53 +00:00
|
|
|
backups:
|
2021-03-04 18:44:12 +00:00
|
|
|
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:
|