→ cards/09-deployment

Chapter

09 · Deployment, Docker & Cloud

Treat deployment as a contract: build, run, migrate, seed; keep steps explicit.

Mental Model

  • Build artifacts are immutable; config/env are runtime inputs.
  • Migrations are explicit; seeds are intentional (dev/test only).

Checklist

# build
npm run build

# prisma
npx prisma migrate deploy
npx prisma db seed

# docker (example)
docker build -t app .
docker run -p 3000:3000 --env-file .env app

Rules of Thumb

  • No implicit migrations on startup; run them explicitly.
  • Config/env are ⚫; never bake secrets into images.
  • Health/readiness checks are UX for ops; keep them simple.