Forward the COACH_* variables to the api container in the deploy compose
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s

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.
This commit is contained in:
dsantillan committed 2026-09-21 15:24:28 -04:00
1 parent 238eb635c5
commit 40959de0a2
1 file changed
+11
+11
View File
@@ -82,6 +82,17 @@ services:
RP_ID: ${RP_ID}
RP_NAME: ${RP_NAME}
ORIGIN: ${ORIGIN}
# This list is an allowlist: a variable set in the host's .env reaches the container ONLY
# if it is named here. Host env vars are otherwise used just to substitute ${…} in this
# file, so `COACH_PROVIDER` sitting in the panel while the container never sees it is a
# configuration that looks applied and does nothing. The `:-` defaults are what keep an
# instance that sets none of them exactly as it was: an empty value reads as unset.
COACH_PROVIDER: ${COACH_PROVIDER:-}
COACH_BASE_URL: ${COACH_BASE_URL:-}
COACH_MODEL: ${COACH_MODEL:-}
COACH_API_KEY: ${COACH_API_KEY:-}
COACH_DISABLED: ${COACH_DISABLED:-}
COACH_JOB_TIMEOUT_MS: ${COACH_JOB_TIMEOUT_MS:-}
command:
- /bin/sh
- -c