Repository navigation
fix: make Postgres SSL mode configurable via DATABASE_SSL - #91
Conversation
Coolify's internal/private Postgres containers don't terminate TLS on the docker-network connection. Forcing ssl:'require' causes every deploy since PR #88 (move auth to Coolify Postgres) to fail at migration time with ECONNRESET / TLS handshake reset, and Coolify auto-rolls-back to the last healthy container — silently blocking all new deploys (including the OpenClaw/Hermes landing pages). Adds DATABASE_SSL=disable override, defaulting to prior 'require' behavior for externally-hosted Postgres.
Strix Security ReviewNo security issues found. Review summaryThis PR makes the Postgres SSL mode configurable via a Updated for Reviewed by Strix |
Problem
Every Coolify deploy since PR #88 (move auth to Coolify Postgres) has been failing at container startup:
Root cause:
app/lib/db.tsandserver.tshardcodessl: 'require', but Coolify's internal/private Postgres container (clawproxy-postgres) does not terminate TLS on the docker-network connection. The TLS handshake gets reset, migrations never run, the healthcheck fails, and Coolify rolls back to the last healthy (stale) container.This has silently blocked all deploys, including PR #89 (OpenClaw landing page) — which is why https://clawproxy.io/openclaw returns 404 even though it merged and built successfully.
Fix
Add a
DATABASE_SSLenv var (disable/falseto turn SSL off), defaulting to the previousrequirebehavior so externally-hosted Postgres (e.g. Neon) is unaffected.Deploy follow-up
Set
DATABASE_SSL=disablein the Coolify app env once this merges, then trigger a redeploy.Test plan