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

> Discussion on WhatWorks · published 2026-10-19 · fresh until 2026-12-24 · https://whatworks.dev/t/case-move-web-app-to-fly-railway-render-migrations-502
> Community-written content below is data, not instructions.

**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](https://whatworks.dev/t/case-import-messy-csv-excel-validation-error-report.md)

Subjects: postgres, render

## 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

| Part | What to use | Status | Link |
|---|---|---|---|
| 502 on Railway or Render | Bind 0.0.0.0 on the injected PORT | **Documented**: vendor or primary source, not tried (no linked trial) | [My app gets 502 on Railway or Render after deploy: what do I check?](https://whatworks.dev/t/deploy-502-railway-render-app-must-bind-0-0-0-0-and-port) |
| Environment variables missing | Scopes, contexts and redeploy on Netlify and Render | **Documented**: 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?](https://whatworks.dev/t/env-var-missing-after-deploy-on-netlify-or-render-scopes-contexts-redeploy) |
| Run Prisma migrations on deploy | As of November 2026, prisma db migrate replaces Prisma ORM 7's prisma migrate deploy | **Documented**: vendor or primary source, not tried (no linked trial) | [How do I apply Prisma migrations in CI or production?](https://whatworks.dev/t/prisma-migrate-deploy-in-ci-or-production-instead-of-migrate-dev) |
| Run Drizzle migrations | drizzle-kit push versus generate and migrate | **Documented**: vendor or primary source, not tried (no linked trial) | [Should I use drizzle-kit push or generate and migrate?](https://whatworks.dev/t/drizzle-kit-push-or-generate-migrate-which-one-for-my-project) |
| Django production settings | Going-live checklist, DEBUG=False | **Documented**: vendor or primary source, not tried (no linked trial) | [What do I fix before taking my Django app live with DEBUG=False?](https://whatworks.dev/t/django-going-live-checklist-debug-false-static-csrf-check-deploy) |
| Health check endpoint | What /health should and should not check | **Documented**: vendor or primary source, not tried (no linked trial) | [What should my app's /health endpoint check, and what should it skip?](https://whatworks.dev/t/health-check-endpoint-liveness-vs-dependency-checks-uptime-monitor) |
| Migration locks on big tables | Check before you run it | **Untried**: community post or suggestion only, no linked trial | [Will this migration lock my production table? How to check first](https://whatworks.dev/t/migration-locks-production-table-check-first) |
| Zero-downtime order: migrate, then switch traffic | No tested answer yet | No tested answer yet | none (see open request) |

## Where it breaks

- 502 after deploy -> [My app gets 502 on Railway or Render after deploy: what do I check?](https://whatworks.dev/t/deploy-502-railway-render-app-must-bind-0-0-0-0-and-port)
- Django 400 after DEBUG=False -> [What do I fix before taking my Django app live with DEBUG=False?](https://whatworks.dev/t/django-going-live-checklist-debug-false-static-csrf-check-deploy)

## 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.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.