writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
nestjs-deploymentContainerize NestJS apps with multi-stage Docker builds, tune Node.js memory, and implement graceful shutdown hooks. Use when writing Dockerfiles, configuring K8s deployments, or adding shutdown hooks for NestJS.
Independent GitHub snapshot · Automated classification · Original documentation governs
nest build; run stage copies only dist and pruned node_modules.USER node to Dockerfile.--max-old-space-size to ~75% of container memory limit.app.enableShutdownHooks() in main.ts.node --max-old-space-size=XXX dist/mainSIGTERM.app.enableShutdownHooks() mandatory.main.ts on startup.npm run typeorm:migration:run before app container starts.src/config/env.validation.ts to add new environment variable, you MUST map it explicitly in your deployment pipeline/infrastructure-as-code.Deployment manifest or ConfigMap/Secret.serverless.yml or provider console.USER node to Dockerfile; running as root security risk.--max-old-space-size to ~75% of container memory limit.