The api service lists its environment explicitly, and that list is an allowlist:
a variable set in the host's .env reaches the container only when it is named
there. Everything else in the panel is used solely to substitute ${…} in the
compose file — which is how COACH_PROVIDER can sit in Dokploy looking applied
while the api never sees it, the Coach stays off, and no screen anywhere shows a
button. That is exactly what happened on this instance.
The `:-` defaults keep an instance that sets none of them byte-for-byte as it
was: an empty value reads as unset in coach/config.js.
The instance at gym.dploy.lol runs a five-service stack that clones the source
and builds it on every deploy, rather than pulling the images
docker-compose.yml names. That shape has three requirements nothing in the
repository stated, and getting any of them wrong costs a deploy:
- web-build has to copy the whole repository and build from frontend/. The
frontend imports the Coach's core from ../../../api/coach/core/, so a build
stage holding only frontend/ fails with nine UNRESOLVED_IMPORT errors — the
reason web/Dockerfile copies api/coach/core/ into its build stage.
- The volume names have to be pinned with `name:`. Unpinned, a restyled stack
silently creates empty volumes and the profiles and training history look
gone.
- nginx needs client_max_body_size. Its default request limit is 1 MB while the
app PUTs the whole profile to /api/data and the API accepts 5 MB — the sync
starts failing with a 413 the UI cannot explain once a history grows past 1 MB.
web/nginx.conf.template already sets 5m; this matches it.
The file is the shape that instance runs, with its volume names filled in.