2024-11-29 17:16:56 +00:00
|
|
|
# Please consult the `Deployment` section in the readme if you want to deploy
|
|
|
|
# this. You *need* to keep this nginx service, even if you have your own,
|
|
|
|
# otherwise the static files will not be served correctly! If you do remove
|
|
|
|
# it, configure yours similarly to what's in config/nginx.conf
|
|
|
|
# Also take a look at the "Static files" section in the .env file
|
|
|
|
|
|
|
|
services:
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-web:
|
2024-11-29 17:16:56 +00:00
|
|
|
image: wger/server:latest
|
|
|
|
depends_on:
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-db:
|
2024-11-29 17:16:56 +00:00
|
|
|
condition: service_healthy
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-cache:
|
2024-11-29 17:16:56 +00:00
|
|
|
condition: service_healthy
|
2024-12-07 19:05:12 +00:00
|
|
|
#env_file:
|
|
|
|
# - ./config/prod.env
|
2024-11-29 17:16:56 +00:00
|
|
|
volumes:
|
2024-12-07 19:05:12 +00:00
|
|
|
- wger-static:/home/wger/static
|
2024-11-29 17:16:56 +00:00
|
|
|
expose:
|
2024-12-07 19:05:12 +00:00
|
|
|
- 2003
|
2024-11-29 17:16:56 +00:00
|
|
|
healthcheck:
|
2024-12-07 19:05:12 +00:00
|
|
|
test: wget --no-verbose --tries=1 --spider http://localhost:8000
|
2024-11-29 17:16:56 +00:00
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
start_period: 300s
|
|
|
|
retries: 5
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-nginx:
|
2024-11-29 17:16:56 +00:00
|
|
|
image: nginx:stable
|
|
|
|
depends_on:
|
2024-12-07 19:05:12 +00:00
|
|
|
- wger-web
|
2024-11-29 17:16:56 +00:00
|
|
|
volumes:
|
|
|
|
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf
|
2024-12-07 19:05:12 +00:00
|
|
|
- wger-static:/wger/static:ro
|
|
|
|
- wger-media:/wger/media:ro
|
2024-11-29 17:16:56 +00:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
healthcheck:
|
|
|
|
test: service nginx status
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-db:
|
2024-11-29 17:16:56 +00:00
|
|
|
image: postgres:15-alpine
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=wger
|
|
|
|
- POSTGRES_PASSWORD=wger
|
|
|
|
- POSTGRES_DB=wger
|
2024-12-07 19:05:12 +00:00
|
|
|
volumes:
|
|
|
|
- wger-postgres-data:/var/lib/postgresql/data/
|
2024-11-29 17:16:56 +00:00
|
|
|
expose:
|
|
|
|
- 5432
|
|
|
|
healthcheck:
|
|
|
|
test: pg_isready -U wger
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-cache:
|
|
|
|
image: redis:latest
|
2024-11-29 17:16:56 +00:00
|
|
|
expose:
|
|
|
|
- 6379
|
|
|
|
volumes:
|
2024-12-07 19:05:12 +00:00
|
|
|
- wger-redis-data:/data
|
2024-11-29 17:16:56 +00:00
|
|
|
healthcheck:
|
|
|
|
test: redis-cli ping
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
restart: unless-stopped
|
|
|
|
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-celery_worker:
|
2024-11-29 17:16:56 +00:00
|
|
|
image: wger/server:latest
|
|
|
|
command: /start-worker
|
2024-12-07 19:05:12 +00:00
|
|
|
#env_file:
|
|
|
|
# - ./config/prod.env
|
2024-11-29 17:16:56 +00:00
|
|
|
volumes:
|
2024-12-07 19:05:12 +00:00
|
|
|
- wger-media:/home/wger/media
|
2024-11-29 17:16:56 +00:00
|
|
|
depends_on:
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-web:
|
2024-11-29 17:16:56 +00:00
|
|
|
condition: service_healthy
|
|
|
|
healthcheck:
|
|
|
|
test: celery -A wger inspect ping
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
|
|
|
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-celery_beat:
|
2024-11-29 17:16:56 +00:00
|
|
|
image: wger/server:latest
|
|
|
|
command: /start-beat
|
|
|
|
volumes:
|
2024-12-07 19:05:12 +00:00
|
|
|
- wger-celery-beat:/home/wger/beat/
|
|
|
|
#env_file:
|
|
|
|
# - ./config/prod.env
|
2024-11-29 17:16:56 +00:00
|
|
|
depends_on:
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-celery_worker:
|
2024-11-29 17:16:56 +00:00
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
volumes:
|
2024-12-07 19:05:12 +00:00
|
|
|
wger-postgres-data:
|
|
|
|
wger-celery-beat:
|
|
|
|
wger-static:
|
|
|
|
wger-media:
|
|
|
|
wger-redis-data:
|
2024-11-29 17:16:56 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|
2024-12-07 19:05:12 +00:00
|
|
|
name: wger_network
|