| 17-docker-deployment |
02 |
infra |
| docker |
| dockerfile |
| docker-compose |
| nodejs |
| nextjs |
| standalone |
| smtp |
| neon |
|
| phase |
provides |
| 17-01 |
output standalone in next.config.ts, GET /api/health endpoint |
|
|
| Dockerfile with three-stage node:20-slim linux/amd64 build |
| docker-compose.yml with env_file secrets, DNS fix, named uploads volume |
| .dockerignore for build context exclusions |
| .env.production.example template with 11 required vars |
| DEPLOYMENT.md with migration step and startup instructions |
|
| deployment |
| production-ops |
|
| added |
patterns |
|
|
| Three-stage Dockerfile: deps (npm ci --omit=dev) → builder (npm run build) → runner (node server.js) |
| env_file secrets injection — secrets stay in .env.production on host, never baked into image |
| SMTP DNS fix: dns array [8.8.8.8, 1.1.1.1] + NODE_OPTIONS=--dns-result-order=ipv4first |
| Named Docker volume uploads:/app/uploads for persistent PDF storage across restarts |
|
|
| created |
modified |
| teressa-copeland-homes/Dockerfile |
| teressa-copeland-homes/docker-compose.yml |
| teressa-copeland-homes/.dockerignore |
| teressa-copeland-homes/.env.production.example |
| teressa-copeland-homes/DEPLOYMENT.md |
|
| teressa-copeland-homes/.gitignore |
|
|
| --platform=linux/amd64 on all 3 FROM lines — home server is x86_64; Mac ARM cross-compiles correctly |
| node:20-slim (Debian) not Alpine — @napi-rs/canvas requires glibc, Alpine musl incompatible |
| seeds/ copied into runner stage at /app/seeds — runtime dependency for form library import feature |
| uploads/ pre-created in runner stage, owned by nextjs user — volume mount works without root |
| HEALTHCHECK uses wget (in Debian slim by default) not curl (not installed) |
| .env.production.example force-added past .env* gitignore glob — example template should be committed |
| Migrations run from host, not inside container — CMD is simply node server.js per D-02 |
|
| Docker deployment: build on host → push or deploy to server → run migrations → docker compose up |
|
| DEPLOY-01 |
| DEPLOY-02 |
| DEPLOY-03 |
| DEPLOY-04 |
| DEPLOY-05 |
|
3min |
2026-04-03 |