Sign inSign up

sisqueslabs/nestjs-template

By sisqueslabs

•Updated 1 day ago

Image
0

10K+

sisqueslabs/nestjs-template repository overview

⁠NestJS Template

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.

⁠Quick start

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.

⁠Ports

PortPurpose
3000HTTP — REST (/api/*), GraphQL (/graphql), Swagger docs, health, metrics, MCP (see routes below)

⁠Routes

PathPurpose
GET /api/health/liveLiveness probe
GET /api/health/readyReadiness probe (checks DB connectivity)
POST /api/mcpMCP (Model Context Protocol) endpoint
POST /graphqlGraphQL (Apollo)
GET /docsSwagger 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.

⁠Environment variables

VariableDefaultRequiredNotes
PORT3000NoHTTP port
NODE_ENVproductionNo
DATABASE_DRIVERpostgresNoOnly postgres is supported
DATABASE_HOST—Yes
DATABASE_PORT5432No
DATABASE_USERNAME—Yes
DATABASE_PASSWORD—Yes
DATABASE_DATABASE—Yes
DATABASE_MIGRATIONS_RUNtrueNoRuns pending migrations on boot
CORS_ORIGINS—Production onlyComma-separated allowed origins
OTEL_EXPORTER_OTLP_ENDPOINT—NoOpenTelemetry traces+metrics+logs disabled when unset
KAFKA_ENABLEDfalseNoDomain event forwarding; app boots fine without a broker when disabled
KAFKA_BROKERS—If Kafka enabledComma-separated broker list
LOG_LEVELinfoNo

See the project's .env.example for the full list.

⁠Tags

  • latest — most recent stable release (main branch)
  • x.y.z — specific stable release
  • x.y.z-alpha.n / -beta.n / -rc.n — prereleases from develop/staging

⁠Source

https://github.com/sisques-labs/nestjs-template⁠

Tag summary

Content type

Image

Digest

sha256:480d50781…

Size

112.7 MB

Last updated

1 day ago

docker pull sisqueslabs/nestjs-template:edge