Skip to content

fix(compose): forward GMAIL_* and GCAL_* into the gateway container - #109

Merged
cryptolir merged 2 commits into
mainfrom
fix/compose-forward-gmail-env
Jul 29, 2026
Merged

cryptolir merged 2 commits into
mainfrom
fix/compose-forward-gmail-env

Conversation

@cryptolir

Copy link
Copy Markdown
Owner

The gateway docker-compose.yml uses an explicit environment: allowlist and no env_file, so GMAIL_ADDRESS/GMAIL_APP_PASSWORD written to a per-agent docker.env never reach the container. Verified live on the US host: both keys present in projectmanager/docker.env, MISSING_IN_PROCESS in the gateway. This is the root cause of dashboard-Gmail not working (openclaw-dashboard openclaw#234/openclaw#235) — the whole plan assumed docker.env forwards to the container env; it doesn't for non-allowlisted keys. Inline creds worked only because the agent set them for the script run.

Adds the two keys to both gateway service environment: blocks with an empty ${..:-} default — inert for agents without a connected mailbox (the gmail skill is per-agent, installed only on connect). Container recreate required to apply. Deploying to /opt/openclaw/docker-compose.yml on both hosts.

@codex review

Liran Peretz and others added 2 commits July 25, 2026 11:13
…aking gap)

The gateway compose uses an explicit environment: allowlist and NO env_file, so
GMAIL_ADDRESS/GMAIL_APP_PASSWORD written to a per-agent docker.env never reached
the container — os.environ had neither, and the gmail skill could not read the
credential. Verified live: keys present in projectmanager/docker.env, but
MISSING_IN_PROCESS. The dashboard Gmail plan + review assumed docker.env
forwards to container env; it doesn't for non-allowlisted keys. Inline creds
worked only because the agent set them for the script run.

Adds GMAIL_ADDRESS/GMAIL_APP_PASSWORD (empty ${..:-} default) to both gateway
service env blocks. Inert for agents with no mailbox (the skill is per-agent,
installed only on connect). Container recreate required to apply.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Same allowlist rule as the GMAIL_* pair this PR already adds: this compose
has no env_file, so a key written to a per-agent docker.env reaches the
container ONLY if it is named here. Calendar writes GCAL_RUNTIME_URL and
GCAL_RUNTIME_TOKEN on enable; without these lines the skill declares both
in requires.env (ALL semantics) and stays permanently invisible behind a
green Connected card.

Neither value is a Google credential: the URL is public, and the token
authenticates only against the dashboard Calendar broker (one endpoint,
per-agent, dead the instant the agent is disabled). The Google refresh
token stays encrypted in Firestore and never enters this file.

Co-Authored-By: Claude Opus 5 <[email protected]>
@cryptolir cryptolir changed the title fix(compose): forward GMAIL_* into the gateway container fix(compose): forward GMAIL_* and GCAL_* into the gateway container Jul 29, 2026
@cryptolir

Copy link
Copy Markdown
Owner Author

Extended to cover Calendar as well — same file, same root cause, so one merge fixes both.

Added GCAL_RUNTIME_URL + GCAL_RUNTIME_TOKEN to both services alongside the GMAIL_* pair (c1404f8). Calendar (openclaw-dashboard openclaw#241) writes these two keys to a per-agent docker.env on enable; without these lines the skill declares both in requires.env under ALL semantics and stays permanently invisible behind a green Connected card — the identical failure this PR was opened for.

Neither value is a Google credential: the URL is public, and the token authenticates only against the dashboard's Calendar broker (one endpoint, per-agent, dead the instant the agent is disabled). The Google refresh token stays encrypted in Firestore and never enters this file.

⚠️ Worth noting for whoever merges: the GMAIL_* half of this PR was applied manually to /opt/openclaw/docker-compose.yml on the EU and US hosts back in July and verified live (NOW_SET_IN_PROCESS), but has sat unmerged upstream since — so the fleet's working config exists only as a host-local patch that a fresh provision or a compose regeneration would silently lose. Merging this records it.

@cryptolir cryptolir closed this Jul 29, 2026
@cryptolir cryptolir reopened this Jul 29, 2026
@cryptolir
cryptolir merged commit 00376d1 into main Jul 29, 2026
7 of 9 checks passed
@cryptolir
cryptolir deleted the fix/compose-forward-gmail-env branch July 29, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant