Files
umbrel-apps/wger/docker-compose.yml
Nathan Fretz b5f09244e8 Update nginx sidecar to 1.30.7-alpine in 8 apps
Security update for the nginx web server sidecar in agora, mosquitto,
netbird, rustdesk-server, public-pool, openreader, plane and wger.
Package-only patch bumps; no upstream app changes.
2026-11-19 13:29:01 +10:00

179 lines
5.7 KiB
YAML

version: '3.7'
services:
app_proxy:
environment:
APP_HOST: wger_nginx_1
APP_PORT: 80
PROXY_AUTH_WHITELIST: "/allauth,/allauth/*,/api/v2,/api/v2/*,/ps,/ps/*,/media/exercise-images/*,/media/exercise-video/*,/media/ingredients/*"
web:
image: wger/server:2.7@sha256:eb6e30666ae3058f3094b6030ab661fa3062c9e2ab33c72b554031acf37a3104
user: "1000:1000"
depends_on:
db:
condition: service_healthy
cache:
condition: service_healthy
powersync_setup:
condition: service_completed_successfully
environment:
SECRET_KEY: ${APP_SEED}
CSRF_TRUSTED_ORIGINS: http://${DEVICE_DOMAIN_NAME}:${APP_WGER_PORT},https://${DEVICE_DOMAIN_NAME}:${APP_WGER_PORT},http://${DEVICE_HOSTNAME}:${APP_WGER_PORT},https://${DEVICE_HOSTNAME}:${APP_WGER_PORT},${APP_WGER_LOCAL_URLS}
SITE_URL: http://${DEVICE_DOMAIN_NAME}:${APP_WGER_PORT}
MEDIA_URL: http://${DEVICE_DOMAIN_NAME}:${APP_WGER_PORT}/media/
PS_DATABASE_URI: postgres://wger:wger@db:5432/wger
PS_STORAGE_PG_URI: postgres://powersync_storage:${APP_SEED}@db:5432/wger
POWERSYNC_URL_PATH: ps
env_file:
- ${APP_DATA_DIR}/config/prod.env
volumes:
- ${APP_DATA_DIR}/data/static:/home/wger/static
- ${APP_DATA_DIR}/data/media:/home/wger/media
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "-O", "/dev/null", "http://localhost:8000/api/v2/version/"]
interval: 10s
timeout: 5s
start_period: 300s
retries: 5
restart: on-failure
powersync_setup:
image: wger/server:2.7@sha256:eb6e30666ae3058f3094b6030ab661fa3062c9e2ab33c72b554031acf37a3104
user: "1000:1000"
command: ./manage.py setup-powersync-storage
depends_on:
db:
condition: service_healthy
environment:
SECRET_KEY: ${APP_SEED}
PS_DATABASE_URI: postgres://wger:wger@db:5432/wger
PS_STORAGE_PG_URI: postgres://powersync_storage:${APP_SEED}@db:5432/wger
env_file:
- ${APP_DATA_DIR}/config/prod.env
restart: on-failure
powersync:
image: journeyapps/powersync-service:1.22.0@sha256:2d5084910f03a029174ebc7f7ce0c0d2c43e932ead63a2d87b919e90ebbb0e77
depends_on:
db:
condition: service_healthy
web:
condition: service_healthy
powersync_setup:
condition: service_completed_successfully
command: ["start", "-r", "unified"]
environment:
POWERSYNC_CONFIG_PATH: /config/powersync.yaml
PS_JWKS_URL: http://wger_web_1:8000/api/v2/powersync-keys
PS_DATABASE_URI: postgres://wger:wger@db:5432/wger
PS_STORAGE_PG_URI: postgres://powersync_storage:${APP_SEED}@db:5432/wger
PS_PORT: 8080
volumes:
- ${APP_DATA_DIR}/powersync.yaml:/config/powersync.yaml:ro
- ${APP_DATA_DIR}/sync_rules.yaml:/config/sync_rules.yaml:ro
restart: on-failure
nginx:
image: nginx:1.30.7-alpine@sha256:bef154735288bc38d99fac41ae63730684bcc661503673a04a0f9bc526ba8598
depends_on:
- web
- powersync
volumes:
- ${APP_DATA_DIR}/config/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ${APP_DATA_DIR}/data/static:/wger/static:ro
- ${APP_DATA_DIR}/data/media:/wger/media:ro
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:80/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: on-failure
db:
image: postgres:17.5-alpine@sha256:6567bca8d7bc8c82c5922425a0baee57be8402df92bae5eacad5f01ae9544daa
user: "1000:1000"
shm_size: 256mb
environment:
POSTGRES_USER: wger
POSTGRES_PASSWORD: wger
POSTGRES_DB: wger
TZ: Europe/Berlin
volumes:
- ${APP_DATA_DIR}/data/postgres-data:/var/lib/postgresql/data/
command:
- postgres
- -c
- wal_level=logical
- -c
- shared_buffers=256MB
- -c
- effective_cache_size=768MB
- -c
- work_mem=8MB
- -c
- random_page_cost=1.1
- -c
- max_connections=30
healthcheck:
test: pg_isready -U wger
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: on-failure
cache:
image: redis:8.0.3-alpine@sha256:25c0ae32c6c2301798579f5944af53729766a18eff5660bbef196fc2e6214a9c
user: "1000:1000"
volumes:
- ${APP_DATA_DIR}/data/redis-data:/data
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: on-failure
celery_worker:
image: wger/server:2.7@sha256:eb6e30666ae3058f3094b6030ab661fa3062c9e2ab33c72b554031acf37a3104
user: "1000:1000"
command: /start-worker
environment:
SECRET_KEY: ${APP_SEED}
PS_DATABASE_URI: postgres://wger:wger@db:5432/wger
PS_STORAGE_PG_URI: postgres://powersync_storage:${APP_SEED}@db:5432/wger
env_file:
- ${APP_DATA_DIR}/config/prod.env
volumes:
- ${APP_DATA_DIR}/data/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
restart: on-failure
celery_beat:
image: wger/server:2.7@sha256:eb6e30666ae3058f3094b6030ab661fa3062c9e2ab33c72b554031acf37a3104
user: "1000:1000"
command: /start-beat
environment:
SECRET_KEY: ${APP_SEED}
PS_DATABASE_URI: postgres://wger:wger@db:5432/wger
PS_STORAGE_PG_URI: postgres://powersync_storage:${APP_SEED}@db:5432/wger
volumes:
- ${APP_DATA_DIR}/data/celery-beat:${APP_DATA_DIR}/beat/
env_file:
- ${APP_DATA_DIR}/config/prod.env
depends_on:
celery_worker:
condition: service_healthy
restart: on-failure