// Docker & CI
Docker & CI
A Dockerfile with a healthcheck, a docker-compose stack with MongoDB, and a GitHub Actions pipeline.
The DevOps options generate everything you need to containerize the app and run a CI pipeline.
Docker
Enabling Docker adds:
Dockerfile # multi-stage build (compiles TS → dist/ for TypeScript)
docker-compose.yml # app + MongoDB service
.dockerignore # lean build context- The
Dockerfileis multi-stage for TypeScript projects, producing a small runtime image from the compileddist/. - A
HEALTHCHECKis configured againstGET /health. docker-compose.ymlbrings up the app alongside a MongoDB container for local end-to-end runs.
docker compose upGitHub Actions CI
Enabling CI adds a workflow at .github/workflows/ci.yml plus a Dependabot config. The
pipeline runs the checks that matter:
- Lint — ESLint
- Test — Jest with coverage
- Build —
npm run build/ TypeScript compile - Docs check —
npm run docs -- --check, failing if the committed docs are stale
.github/
├── workflows/ci.yml
└── dependabot.ymltip
The docs-check step is what keeps your API documentation trustworthy over time — a PR that changes a route but forgets to regenerate docs fails CI instead of silently drifting.
