Skip to content

fix(deploy): fix SELF_SIGNED_CERT_IN_CHAIN in production migration containers#996

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/deploy-ssl-cert-chain
Mar 23, 2026
Merged

fix(deploy): fix SELF_SIGNED_CERT_IN_CHAIN in production migration containers#996
zbigniewsobiecki merged 1 commit intodevfrom
fix/deploy-ssl-cert-chain

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Migration steps were passing --env-file /opt/services/cascade.env which doesn't contain DATABASE_SSL, causing getDb() to fail with SELF_SIGNED_CERT_IN_CHAIN against Supabase's connection pooler
  • Replace --env-file with explicit -e DATABASE_SSL=false on the three migration containers (drizzle-kit migrate, migrate-triggers.ts, migrate-hooks.ts)
  • Add -e DATABASE_SSL=false to the re-encrypt step (keeps --env-file for CREDENTIAL_MASTER_KEY)
  • Add "Configure DATABASE_SSL for production" step that idempotently injects DATABASE_SSL=false into /opt/services/cascade.env before service restarts, ensuring the router and dashboard also pick it up

Test plan

  • Next push to main — all three migration steps pass without SELF_SIGNED_CERT_IN_CHAIN
  • cascade-router and cascade-dashboard come up healthy after deploy

🤖 Generated with Claude Code

…ntainers

Migration steps were using --env-file /opt/services/cascade.env which
doesn't contain DATABASE_SSL, causing getDb() to fail with
SELF_SIGNED_CERT_IN_CHAIN against Supabase's connection pooler.

- Replace --env-file with explicit -e DATABASE_SSL=false on the three
  migration containers (drizzle-kit, migrate-triggers, migrate-hooks)
- Add -e DATABASE_SSL=false to the re-encrypt step (keeps --env-file for
  CREDENTIAL_MASTER_KEY)
- Add "Configure DATABASE_SSL for production" step that idempotently
  injects DATABASE_SSL=false into /opt/services/cascade.env before
  service restarts, so router and dashboard also get it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit efe984e into dev Mar 23, 2026
8 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/deploy-ssl-cert-chain branch March 23, 2026 15:51
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