Skip to content

fix(deploy): pass SSL env vars to all migration steps#994

Merged
zbigniewsobiecki merged 1 commit intodevfrom
fix/deploy-migration-ssl-env
Mar 23, 2026
Merged

fix(deploy): pass SSL env vars to all migration steps#994
zbigniewsobiecki merged 1 commit intodevfrom
fix/deploy-migration-ssl-env

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Migration containers (run db migrate, run trigger config migration, run hooks migration) were only passed DATABASE_URL, missing DATABASE_SSL and DATABASE_CA_CERT
  • After fix(db): enable TLS certificate validation by default for DB connections #979 enabled TLS cert validation by default, these steps started failing with SELF_SIGNED_CERT_IN_CHAIN — breaking the most recent dev deploy (run 23445122822)
  • The re-encrypt step already used --env-file /opt/services/cascade.env correctly; this PR applies the same pattern to the three migration steps

Root cause

Error: self-signed certificate in certificate chain
  code: 'SELF_SIGNED_CERT_IN_CHAIN'

The DATABASE_SSL / DATABASE_CA_CERT env vars were added in #992 for worker containers but the deploy workflow migration steps were not updated.

Test plan

  • Trigger a dev deploy via workflow_dispatch and verify all migration steps pass
  • Confirm cascade-router and cascade-dashboard come up healthy

🤖 Generated with Claude Code

Migration containers were missing DATABASE_SSL and DATABASE_CA_CERT,
causing SELF_SIGNED_CERT_IN_CHAIN failures after TLS cert validation
was enabled by default in #979.

Add --env-file /opt/services/cascade.env to the three migration steps
(db migrate, trigger config migration, hooks migration) so they pick
up the same SSL configuration already used by the re-encrypt step.

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