compose/wger/docker-compose.yml

95 lines
2.3 KiB
YAML
Raw Normal View History

2024-08-06 16:12:54 -03: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:
web:
image: wger/server:latest
container_name: wger_web
depends_on:
db:
condition: service_healthy
cache:
condition: service_healthy
env_file:
- ../stack.env
volumes:
- /docker/appdata/wger/web/static:/home/wger/static
- /docker/appdata/wger/web/media:/home/wger/media
ports:
- "8000:8000"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8000
interval: 10s
timeout: 5s
start_period: 300s
retries: 5
restart: unless-stopped
db:
image: postgres:15-alpine
container_name: wger_db
environment:
- POSTGRES_USER=wger
- POSTGRES_PASSWORD=wger
- POSTGRES_DB=wger
volumes:
- /docker/appdata/wger/postgres:/var/lib/postgresql/data/
expose:
- 5432
healthcheck:
test: pg_isready -U wger
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
cache:
image: redis
container_name: wger_cache
expose:
- 6379
volumes:
- /docker/appdata/wger/cache:/data
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
celery_worker:
image: wger/server:latest
container_name: wger_worker
command: /start-worker
env_file:
- ../stack.env
volumes:
- /docker/appdata/wger/web/media:/home/wger/media
depends_on:
web:
condition: service_healthy
healthcheck:
test: celery -A wger inspect ping
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
celery_beat:
image: wger/server:latest
container_name: wger_beat
command: /start-beat
volumes:
- /docker/appdata/wger/beat:/home/wger/beat/
env_file:
- ../stack.env
depends_on:
celery_worker:
condition: service_healthy