06 / Post-mortem
What broke
What broke moving the API from Railway to Render, straight from the logs.
Incident 1 · Build
The Docker build fails
"/prisma.config.ts": not found
ROOT CAUSERender built from the repo root, so the Dockerfile's COPY paths pointed outside the build context.
FIXRoot directory set to apps/api, and the setting kept in a render.yaml in Git so it can't drift.
Incident 2 · Boot
The container crashes on start
Cannot find module '@react-email/components'
ROOT CAUSEEmails render at runtime, but the packages were devDependencies, and npm prune deleted them from the image.
FIXMoved to dependencies, plus cors, which had only been installed by accident through socket.io.
Incident 3 · Redis
Redis won't connect
connect EACCES / → ECONNRESET
ROOT CAUSEAn https:// REST URL went where ioredis wants redis://, so it was read as a socket path. Then plain redis:// hit a TLS-only server.
FIXA rediss:// URL, with TLS switched on for the BullMQ connection too.
Incident 4 · Data
Login fails in production
table "refresh_tokens" does not exist
ROOT CAUSEThe new database was restored from a dump taken before the last five migrations.
FIXprisma migrate deploy against the new database. All five were additive, so no data was touched.