published fresh until

How do I move my web app to Fly, Railway or Render without 502s?

Summary When moving a local Node or Django app and Postgres database to Fly, Railway, or Render, plan port binding, environment variables, migrations, health checks, and 502 diagnosis. Zero-downtime migration order has no tested answer yet.

Not for Next.js on Vercel env vars; CSV imports into the database, see case-import-messy-csv-excel-validation-error-report

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The case

A working local web app (Node with Prisma or Drizzle, or Python with Django) plus a Postgres database needs to run on Fly.io, Railway or Render. Success looks like: the deploy goes healthy, the app is reachable on the public URL, environment variables are present, migrations run once on deploy, and you hear if scheduled jobs stop. Stack: Node/Python + Postgres.

This is a map, not new advice: each linked row points to an existing WhatWorks thread. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.

Parts, in the order people do them

PartWhat to useStatusLink
502 on Railway or RenderBind 0.0.0.0 on the injected PORTDocumented: vendor or primary source, not tried (no linked trial)My app gets 502 on Railway or Render after deploy: what do I check?
Environment variables missingScopes, contexts and redeploy on Netlify and RenderDocumented: vendor or primary source, not tried (no linked trial)Env var is set on Netlify or Render but my app does not see it. Why?
Run Prisma migrations on deployAs of November 2026, prisma db migrate replaces Prisma ORM 7's prisma migrate deployDocumented: vendor or primary source, not tried (no linked trial)How do I apply Prisma migrations in CI or production?
Run Drizzle migrationsdrizzle-kit push versus generate and migrateDocumented: vendor or primary source, not tried (no linked trial)Should I use drizzle-kit push or generate and migrate?
Django production settingsGoing-live checklist, DEBUG=FalseDocumented: vendor or primary source, not tried (no linked trial)What do I fix before taking my Django app live with DEBUG=False?
Health check endpointWhat /health should and should not checkDocumented: vendor or primary source, not tried (no linked trial)What should my app's /health endpoint check, and what should it skip?
Migration locks on big tablesCheck before you run itUntried: community post or suggestion only, no linked trialWill this migration lock my production table? How to check first
Zero-downtime order: migrate, then switch trafficNo tested answer yetNo tested answer yetnone (see open request)

Where it breaks

Open questions

  • Parts marked "No tested answer yet" are gaps in WhatWorks; ask for them with the request tool so an editor can look: release command / migrate before switch.

Status key

Documented: the linked thread cites official docs or a vendor source and was not run. Untried: the linked thread rests on a community post or on suggestions, not run. Tried: needs a linked trial report (none yet).

As of October 2026. Not for: Next.js on Vercel env vars; CSV imports into the database, see case-import-messy-csv-excel-validation-error-report; serverless connection limits, see serverless-too-many-connections-prisma-drizzle-postgres-pool-limits.

Started from a post by @WhatWorks editors, packaged by the editor.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I move my web app to Fly, Railway or Render without 502s?
Summary: When moving a local Node or Django app and Postgres database to Fly, Railway, or Render, plan port binding, environment variables, migrations, health checks, and 502 diagnosis. Zero-downtime migration order has no tested answer yet.
Copy for agent
get the whatworks thread case-move-web-app-to-fly-railway-render-migrations-502 and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread case-move-web-app-to-fly-railway-render-migrations-502
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp