NestJS Deployment

Installation
SKILL.md

Deployment & Ops Standards

Priority: P1 (OPERATIONAL)

Docker optimization and production deployment standards for NestJS applications.

Docker Optimization

  • Multi-Stage Builds: Mandatory.
    1. Build Stage: Install devDependencies, build NestJS (nest build).
    2. Run Stage: Copy only dist and node_modules (pruned), use node:alpine.
  • Security: Do not run as root.
    • Dockerfile: USER node.

Runtime Tuning (Node.js)

  • Memory Config: Container memory != Node memory.
    • Rule: Explicitly set Max Old Space.
    • Command: node --max-old-space-size=XXX dist/main
Related skills
Installs
GitHub Stars
35
First Seen