Skip to content

Switch backend database wiring from Render Postgres to Supabase#60

Merged
aichannode merged 2 commits into
mainfrom
fix/render-supabase-pooled-connections
Jul 5, 2026
Merged

Switch backend database wiring from Render Postgres to Supabase#60
aichannode merged 2 commits into
mainfrom
fix/render-supabase-pooled-connections

Conversation

@engdotme

@engdotme engdotme commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Point Prisma at Supabase instead of the (now-unused) Render-managed
    Postgres instance. Adds directUrl to the Prisma datasource so
    prisma migrate deploy uses a session-mode connection while normal
    runtime queries go through a pooled connection.
  • Update render.yaml to match: drop the databases: block and the
    fromDatabase wiring for DATABASE_URL (both pointed at the old
    Render Postgres), and declare DATABASE_URL/DIRECT_URL as
    dashboard-managed (sync: false) env vars instead.

Why

The backend's database was migrated to Supabase, but render.yaml
still auto-wired DATABASE_URL to Render's own Postgres resource,
causing prisma migrate deploy to fail with
database server` once that database was no longer in use.

Deploy notes (manual, outside this PR)

On the Render dashboard, forgeng-backend

  • DATABASE_URL → Supabase Transaction pooler string (port 6543)
  • DIRECT_URL → Supabase Session pooler

Both must use Supabase's pooler hostnames, n
db.<ref>.supabase.co direct-connection host — that host is
IPv6-only, and Render's network doesn't supp
caused connections to hang indefinitely instead of failing fast.

Test plan

  • Render deploy succeeds (`prisma migrat
  • curl https://forgeng-backend.onrender.com/api/healthz returns
    {"status":"ok","database":"up"}
  • Sign-up on https://forgeng-frontend.vercel.app/sign-up succeeds

@aichannode aichannode temporarily deployed to fix/render-supabase-pooled-connections - forgeng-backend PR #60 July 5, 2026 12:58 — with Render Destroyed
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
forgeng-frontend Ready Ready Preview, Comment Jul 5, 2026 12:58pm

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Frontend coverage

Frontend coverage

Lines Statements Branches Functions
Coverage: 31%
31.29% (819/2617) 24.61% (400/1625) 25.56% (192/751)

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Backend coverage

Backend coverage

Lines Statements Branches Functions
Coverage: 72%
71.37% (1431/2005) 64.98% (850/1308) 73.64% (271/368)

@engdotme engdotme requested a review from aichannode July 5, 2026 12:59
@engdotme engdotme marked this pull request as ready for review July 5, 2026 13:01
@aichannode aichannode merged commit 1f08135 into main Jul 5, 2026
4 checks passed
@aichannode aichannode deleted the fix/render-supabase-pooled-connections branch July 5, 2026 13:01
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.

2 participants