fix(dev): pass Stripe test-mode keys to the api container (BUNYIP-175) #207

Merged
longjacksonle merged 1 commit from fix/BUNYIP-175-compose-pass-stripe-keys into main 2026-06-24 02:37:12 +02:00

Problem

Follow-up to #206. The dev api container gets its env only from compose.dev.yml's explicit environment: block (there is no env_file:). That block forwarded STRIPE_ENCRYPTION_KEY but not STRIPE_SECRET_KEY / STRIPE_WEBHOOK_SECRET, so setting those two in .env (as the new docs and .env.example instruct) had no effect - the api never saw them and payment stayed disabled.

Fix

Add both vars to the api environment: block using the same ${VAR:-} pattern as the rest of the file. Empty default keeps payment disabled; a populated .env now reaches the api. Verified with docker compose -f compose.dev.yml config (both resolve into the api service).

Apply locally

docker compose -f compose.dev.yml up -d api to recreate the container (a plain restart reuses the old container env and will not pick up the change).

🤖 Generated with Claude Code

## Problem Follow-up to #206. The dev api container gets its env only from compose.dev.yml's explicit `environment:` block (there is no `env_file:`). That block forwarded `STRIPE_ENCRYPTION_KEY` but not `STRIPE_SECRET_KEY` / `STRIPE_WEBHOOK_SECRET`, so setting those two in `.env` (as the new docs and `.env.example` instruct) had no effect - the api never saw them and payment stayed disabled. ## Fix Add both vars to the api `environment:` block using the same `${VAR:-}` pattern as the rest of the file. Empty default keeps payment disabled; a populated `.env` now reaches the api. Verified with `docker compose -f compose.dev.yml config` (both resolve into the api service). ## Apply locally `docker compose -f compose.dev.yml up -d api` to recreate the container (a plain `restart` reuses the old container env and will not pick up the change). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(dev): pass STRIPE_SECRET_KEY + STRIPE_WEBHOOK_SECRET to api (BUNYIP-175)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 31s
Check / fmt + clippy + build + tests (pull_request) Successful in 4m33s
Create release / Create release from merged PR (pull_request) Has been skipped
85052b1a5e
The dev api container receives env only through compose.dev.yml's explicit `environment:` block (there is no `env_file:`), and that block forwarded `STRIPE_ENCRYPTION_KEY` but not the test-mode `STRIPE_SECRET_KEY` / `STRIPE_WEBHOOK_SECRET`. As a result, setting those two in `.env` (as dev-docs/stripe-test-mode.md and .env.example now instruct) had no effect: the api process never saw them and payment stayed disabled.

Add both vars to the api `environment:` block with the `${VAR:-}` pattern used by the rest of the file, so an empty default keeps payment disabled and a populated `.env` reaches the api. `docker compose -f compose.dev.yml config` now resolves both into the api service.

Recreate the api container to pick up the values: `docker compose -f compose.dev.yml up -d api` (a plain `restart` reuses the old container env).

#BUNYIP-175

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle scheduled this pull request to auto merge when all checks succeed 2026-06-24 02:33:13 +02:00
longjacksonle deleted branch fix/BUNYIP-175-compose-pass-stripe-keys 2026-06-24 02:37:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!207
No description provided.