Fix docker-compose not forwarding SECRET_KEY into container

SECRET_KEY, APP_URL, and DEBUG were hardcoded/missing in the compose
environment block, so passing SECRET_KEY from the host env had no effect
and the container always raised ImproperlyConfigured in production mode.

All three are now forwarded via ${VAR} substitution, consistent with
the other configurable values.
This commit is contained in:
2026-06-14 22:12:16 +02:00
parent d8558eca89
commit c2f9263f52
+4 -3
View File
@@ -1,16 +1,17 @@
---
services:
timetracker:
image: ${REGISTRY_URL:-registry.kucharczyk.xyz}/timetracker:1.7.0
image: ${REGISTRY_URL:-registry.kucharczyk.xyz}/timetracker:latest
build:
context: .
dockerfile: Dockerfile
container_name: timetracker
environment:
- DEBUG=false
- DEBUG=${DEBUG:-false}
- SECRET_KEY=${SECRET_KEY}
- TZ=${TZ:-Europe/Prague}
# APP_URL drives ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS unless overridden.
- APP_URL=https://tracker.kucharczyk.xyz
- APP_URL=${APP_URL:-https://tracker.kucharczyk.xyz}
- PUID=${PUID:-1000}
- PGID=${PGID:-100}
- DATA_DIR=${DATA_DIR:-/home/timetracker/app/data}