Deploy · Docker
Dockerized deployment
When you opt in to Docker during scaffolding, CEM ships a secure multi-stage Dockerfile and a docker-compose with the correct database sidecar for your ORM choice.
docker-compose.yml
CEM auto-selects the right database image: mongo:7 for Mongoose, or postgres:16-alpine for Prisma / Drizzle.
docker-compose.ymlyaml
services:
app:
build: .
ports:
- "5000:5000"
environment:
- NODE_ENV=production
- PORT=5000
- MONGO_URI=mongodb://db:27017/taskflow
depends_on:
- db
db:
image: mongo:7
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
volumes:
mongo-data:Launch the stack
bash
docker compose up --buildYour app is exposed at http://localhost:5000 with the database sidecar ready. The Dockerfile uses a multi-stage build so the final image ships only the compiled output plus production dependencies.