Skip to content

fix(docker): name the required secrets in profile env templates - #136

Merged
fjlopez merged 2 commits into
devfrom
fix/env-template-required-secrets
Oct 30, 2026
Merged

fjlopez merged 2 commits into
devfrom
fix/env-template-required-secrets

Conversation

@fjlopez

@fjlopez fjlopez commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Why

Copying a profile to .env named only MIDDLEWARE_SECRET, so an operator had no hint of SITMUN_USER_SECRET or SITMUN_MBTILES_JOB_HANDLE_SECRET. Root Compose still refuses to start until those values are set. The templates now show all three names and how to generate them.

Fixes #134

What changed

  • Every profiles/*.env file lists the three secrets as comments and leaves them unset. postgres.env and oracle.env no longer mention only MIDDLEWARE_SECRET.
  • tools/scripts/check-compose-secrets.sh fails when a template omits a commented key or assigns a value. It still checks that Compose refuses to render without the secrets.
  • .github/workflows/compose-secrets.yml runs that script on pull requests.

Scope

Profile templates, the secret check, and its workflow. setup.sh, setup.ps1, and the README are unchanged. No secret values are committed. A copied profile still does not start until the operator generates the values.

Verification

  • With the template edits set aside, bash tools/scripts/check-compose-secrets.sh exited 1 and reported that each profile does not name SITMUN_USER_SECRET or SITMUN_MBTILES_JOB_HANDLE_SECRET.
  • With the edits restored, the same script exited 0. Templates name the three secrets and do not assign them, and root Compose still refuses to render without them.

Compose already refuses to start without the three secrets. Nothing
checked that the profile templates name them, so a copy of postgres.env
or oracle.env omitted two required keys.

The check matches a commented key and rejects an assignment. CI runs it
on pull requests.
Copying a profile to .env left SITMUN_USER_SECRET and
SITMUN_MBTILES_JOB_HANDLE_SECRET unnamed, so Compose stopped with
"variable is required". The templates now name the three keys and still
leave them unset.

Fixes #134
@fjlopez
fjlopez merged commit 827fc3c into dev Oct 30, 2026
8 checks passed
@fjlopez
fjlopez deleted the fix/env-template-required-secrets branch November 1, 2026 16:41
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