Sisques Labs' base template for new NestJS services: DDD + CQRS + Hexagonal architecture, TypeORM/PostgreSQL, optional Kafka event forwarding, REST (Swagger) + GraphQL (Apollo) transports, structured logging, OpenTelemetry traces + metrics + logs, and an MCP endpoint.
This image ships with zero bounded contexts — it's the infrastructure skeleton new services are cloned from, not a ready-to-run business API.
docker run -p 3000:3000 \
-e DATABASE_HOST=host.docker.internal \
-e DATABASE_PORT=5432 \
-e DATABASE_USERNAME=postgres \
-e DATABASE_PASSWORD=secret \
-e DATABASE_DATABASE=nestjs_template_db \
sisqueslabs/nestjs-template:latest
The container needs a reachable PostgreSQL instance — it does not bundle one.
| Port | Purpose |
|---|---|
3000 | HTTP — REST (/api/*), GraphQL (/graphql), Swagger docs, health, metrics, MCP (see routes below) |
| Path | Purpose |
|---|---|
GET /api/health/live | Liveness probe |
GET /api/health/ready | Readiness probe (checks DB connectivity) |
POST /api/mcp | MCP (Model Context Protocol) endpoint |
POST /graphql | GraphQL (Apollo) |
GET /docs | Swagger UI |
Traces, metrics, and logs are pushed via OTLP to a collector (see
OTEL_EXPORTER_OTLP_ENDPOINT below) — there is no in-process /metrics
endpoint to scrape. Logs still go to stdout/file regardless.
| Variable | Default | Required | Notes |
|---|---|---|---|
PORT | 3000 | No | HTTP port |
NODE_ENV | production | No | |
DATABASE_DRIVER | postgres | No | Only postgres is supported |
DATABASE_HOST | — | Yes | |
DATABASE_PORT | 5432 | No | |
DATABASE_USERNAME | — | Yes | |
DATABASE_PASSWORD | — | Yes | |
DATABASE_DATABASE | — | Yes | |
DATABASE_MIGRATIONS_RUN | true | No | Runs pending migrations on boot |
CORS_ORIGINS | — | Production only | Comma-separated allowed origins |
OTEL_EXPORTER_OTLP_ENDPOINT | — | No | OpenTelemetry traces+metrics+logs disabled when unset |
KAFKA_ENABLED | false | No | Domain event forwarding; app boots fine without a broker when disabled |
KAFKA_BROKERS | — | If Kafka enabled | Comma-separated broker list |
LOG_LEVEL | info | No |
See the project's .env.example for the full list.
latest — most recent stable release (main branch)x.y.z — specific stable releasex.y.z-alpha.n / -beta.n / -rc.n — prereleases from develop/stagingContent type
Image
Digest
sha256:480d50781…
Size
112.7 MB
Last updated
1 day ago
docker pull sisqueslabs/nestjs-template:edge