diff --git a/docker-compose.yml b/docker-compose.yml index a3930a9..c97fea7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -112,7 +112,11 @@ services: WORKERS: ${WORKERS:-4} # One worker wins this lock and runs the subscription notifier / homepage # sweep; it lives on the appdata volume so it's shared across workers. - THERMOGRAPH_SINGLETON_LOCK: /app/data/notifier.lock + THERMOGRAPH_DATA_DIR: /state + # notifier.lock lives in the state volume, which is now mounted at /state + # (NOT /app/data) so it never shadows the Python `data/` package -- see the + # volumes: note below and thermograph-backend paths.py. + THERMOGRAPH_SINGLETON_LOCK: /state/notifier.lock # Prod secrets live in /etc/thermograph.env: POSTGRES_PASSWORD, # THERMOGRAPH_AUTH_SECRET, THERMOGRAPH_VAPID_PRIVATE_KEY/_PUBLIC_KEY, # THERMOGRAPH_COOKIE_SECURE=1, mail/Discord keys, ... (see @@ -123,7 +127,11 @@ services: required: false volumes: # Parquet cache, notifier.lock, homepage.json, vapid.json persist here. - - appdata:/app/data + # /state, NOT /app/data: after the repo split the backend's Python package + # `data/` sits at /app/data, so mounting the runtime volume there erased + # data/*.py and broke `import data.climate` at boot. THERMOGRAPH_DATA_DIR=/state + # (above) points runtime state here instead, clear of the code. + - appdata:/state - applogs:/app/logs # No compose-level healthcheck override -- the image's own Dockerfile # HEALTHCHECK (port-aware via ${PORT}) already covers this, and frontend's