Skip to content

fix(docker): drop the duplicate OPENROUTER_API_KEY entry from compose - #176

Open
Nordalux wants to merge 1 commit into
every-app:mainfrom
Nordalux:fix/compose-duplicate-openrouter-key
Open

fix(docker): drop the duplicate OPENROUTER_API_KEY entry from compose#176
Nordalux wants to merge 1 commit into
every-app:mainfrom
Nordalux:fix/compose-duplicate-openrouter-key

Conversation

@Nordalux

Copy link
Copy Markdown
Contributor

Problem

compose.yaml names OPENROUTER_API_KEY twice under environment::

      # Optional: AI features (SAM, onboarding chat). Without this the setup
      # gate in the app asks for the key, but nothing here would forward it.
      - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
      ...
      # Optional: AI features (SAM, the in-app SEO agent)
      - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
      - OPENROUTER_MODEL=${OPENROUTER_MODEL:-}

This is my fault. #428 had already generalised the passthrough with env_file: .env and listed the key next to OPENROUTER_MODEL. My #152 was merged on top a day later without a rebase, adding a second entry for the same variable.

Nothing is broken: Compose takes the last entry and both resolve to ${OPENROUTER_API_KEY:-}, so the rendered value is unchanged and no warning is emitted. But the duplicate is dead weight, and the comment above my entry now says the opposite of the truth — it claims nothing would forward the key, which stopped being the case the moment env_file landed.

Change

Remove my entry and its stale comment. Keep the one that sits with OPENROUTER_MODEL.

Verification

With a .env containing both variables, docker compose config renders the same values before and after:

      OPENROUTER_API_KEY: sk-or-test
      OPENROUTER_MODEL: some/model

pnpm ci:check passes.

Verified and tested by hand. The description was drafted with AI assistance — I'd rather let the diff do the talking than a long write-up.

#428 had already generalised the passthrough with `env_file: .env` and listed
`OPENROUTER_API_KEY` alongside `OPENROUTER_MODEL`. My every-app#152 landed on top of it
without a rebase and added a second entry for the same variable, so
`environment:` now names it twice.

Compose takes the last entry, and both resolved to `${OPENROUTER_API_KEY:-}`,
so nothing was broken — but the duplicate is dead weight and the comment above
my entry is now wrong: it claims nothing would forward the key, which stopped
being true when `env_file` landed.

Remove my entry and keep the one that sits with `OPENROUTER_MODEL`.

`docker compose config` renders identical values for OPENROUTER_API_KEY and
OPENROUTER_MODEL before and after.
HasimEmre pushed a commit to HasimEmre/open-seo that referenced this pull request Jul 30, 2026
* Fix open-seo MCP auth discovery

* Refine MCP marketing page route and copy
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