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:
+4
-3
@@ -1,16 +1,17 @@
|
|||||||
---
|
---
|
||||||
services:
|
services:
|
||||||
timetracker:
|
timetracker:
|
||||||
image: ${REGISTRY_URL:-registry.kucharczyk.xyz}/timetracker:1.7.0
|
image: ${REGISTRY_URL:-registry.kucharczyk.xyz}/timetracker:latest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: timetracker
|
container_name: timetracker
|
||||||
environment:
|
environment:
|
||||||
- DEBUG=false
|
- DEBUG=${DEBUG:-false}
|
||||||
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
- TZ=${TZ:-Europe/Prague}
|
- TZ=${TZ:-Europe/Prague}
|
||||||
# APP_URL drives ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS unless overridden.
|
# 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}
|
- PUID=${PUID:-1000}
|
||||||
- PGID=${PGID:-100}
|
- PGID=${PGID:-100}
|
||||||
- DATA_DIR=${DATA_DIR:-/home/timetracker/app/data}
|
- DATA_DIR=${DATA_DIR:-/home/timetracker/app/data}
|
||||||
|
|||||||
Reference in New Issue
Block a user