94074840d1
Correcting my own earlier revert. Reverting to 2.3 was WRONG: wger/server:2.3 is
no longer published on Docker Hub (only 2.4, 2.5, 2.6 resolve), so that pin could
not be pulled at all -- the deploy was accepted and no container was ever created.
An unpullable pin is strictly worse than the problem it was meant to avoid.
Every available version (2.4/2.5/2.6, verified) reads the whole DJANGO_DB_* set
unconditionally, even with the sqlite engine. So supplying it is not a hack
around one version -- it is now the only way to run wger at all. Verified live:
2.6 with the full set boots and applies its migrations ('Applying auth.0001_initial
... OK').
USER/PASSWORD/HOST/PORT are ignored by the sqlite backend but must be present.
DJANGO_DB_DATABASE points into the existing wger_data volume (/home/wger/db),
which is where wger's own default sqlite file lived -- so an existing install is
not pointed at an empty database somewhere else.
Campaign 7 catalog sweep.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nn3VgQk9iwEGgyx6QJ2NvE
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
# wger - Edzésnapló és fitnesz tervező
|
|
# Domain: ${SUBDOMAIN}.${DOMAIN}
|
|
# Database: None (file-based)
|
|
# RAM: ~100M (mem_limit: 384M) | Pi-compatible: Yes
|
|
#
|
|
# Environment variables:
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
# SECRET_KEY - Titkosítási kulcs (auto-generated)
|
|
|
|
services:
|
|
wger:
|
|
image: wger/server:2.6
|
|
container_name: wger
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=Europe/Budapest
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
# A wger 2.4+ a TELJES DJANGO_DB_* halmazt beolvassa, akkor is, ha az
|
|
# engine sqlite -- enélkül indulás nélkül kilép ("Set the DJANGO_DB_USER
|
|
# environment variable"). Az USER/PASSWORD/HOST/PORT értékeket az sqlite
|
|
# backend figyelmen kívül hagyja, de jelen kell lenniük.
|
|
# A DATABASE a wger_data kötetre mutat (/home/wger/db), oda, ahol a wger
|
|
# saját alapértelmezett sqlite fájlja is volt -- így meglévő telepítés
|
|
# adatai nem "tűnnek el" egy másik útvonalra.
|
|
- DJANGO_DB_ENGINE=django.db.backends.sqlite3
|
|
- DJANGO_DB_DATABASE=/home/wger/db/database.sqlite
|
|
- DJANGO_DB_USER=wger
|
|
- DJANGO_DB_PASSWORD=wger
|
|
- DJANGO_DB_HOST=localhost
|
|
- DJANGO_DB_PORT=5432
|
|
- SITE_URL=https://${SUBDOMAIN}.${DOMAIN}
|
|
volumes:
|
|
- wger_data:/home/wger/db
|
|
- wger_media:/home/wger/media
|
|
networks:
|
|
- traefik-public
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 384M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:80"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.wger.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
|
- "traefik.http.routers.wger.entrypoints=websecure"
|
|
- "traefik.http.routers.wger.tls=true"
|
|
- "traefik.http.routers.wger.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.wger.loadbalancer.server.port=80"
|
|
|
|
volumes:
|
|
wger_data:
|
|
wger_media:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|