Deployment
Deploy CMS to production with Docker, migrations, and environment configuration.
Docker
A multi-stage Dockerfile is provided at apps/engine/Dockerfile. It builds the engine and serves on port 3000 with a built-in healthcheck (/api/health).
docker build -f apps/engine/Dockerfile -t cms .
docker run -p 3000:3000 --env-file .env cms
Environment variables
See Installation — Environment variables for the full list. At minimum, set:
DATABASE_URL— Postgres connection stringNODE_ENV=production— enables migration file modeCMS_CONFIG_PATH— path to your config fileCMS_ADMIN_PASSWORD— change from the defaultadmin
Migrations
In production (NODE_ENV=production), the engine applies migration files from MIGRATIONS_PATH on startup. Generate and commit them before deploying:
cms migration generate
cms migration run # optional: verify locally first
Graceful shutdown
The engine handles SIGTERM (Docker/k8s) and SIGINT (Ctrl+C) for graceful shutdown. In-flight requests are drained with a 5-second forced-exit timeout.
Production checklist
- Set
NODE_ENV=production - Set a strong
CMS_ADMIN_PASSWORD(the default isadmin) - Generate and commit migration files —
drizzle-kit pushis not used in production - Put a reverse proxy (nginx, Cloudflare) in front for TLS and rate limiting — the built-in rate limiter is in-memory, per-process
- Set
ADMIN_UI=falseif you don’t need the admin panel on this instance
Previous
Admin Extensibility
Next
REST API