nestjs-deployment

Installation
SKILL.md

Deployment & Ops Standards

Priority: P1 (OPERATIONAL)

Workflow: Containerize NestJS App

  1. Write multi-stage Dockerfile — Build stage installs devDeps and runs nest build; run stage copies only dist and pruned node_modules.
  2. Set non-root user — Add USER node to Dockerfile.
  3. Tune memory — Set --max-old-space-size to ~75% of container memory limit.
  4. Enable shutdown hooks — Call app.enableShutdownHooks() in main.ts.
  5. Add K8s pre-stop — Configure 5-10s sleep pre-stop hook for LB draining.

Dockerfile Example

See implementation examples

Runtime Tuning (Node.js)

Installs
1
GitHub Stars
521
First Seen
14 days ago
nestjs-deployment — hoangnguyen0403/agent-skills-standard