| name | nean-deploy |
| description | Deployment checklist and setup for NEAN projects targeting Docker, AWS, or Kubernetes. |
| argument-hint | [--target docker|aws|k8s] [--check-only] |
| allowed-tools | Bash, Write, Read, Glob, Grep |
Purpose
Prepare a NEAN project for production deployment with proper configuration, security hardening, and monitoring setup.
Arguments
--target <platform> โ Deployment target (default: docker)
docker โ Docker Compose (self-hosted, simplest)
aws โ AWS (ECS, RDS, ALB)
k8s โ Kubernetes (Helm charts)
--check-only โ Run pre-deployment checklist without creating files
Pre-deployment checklist (always runs)
Environment
Database
Security
Performance
Monitoring
What gets created (per target)
Docker
docker/
โโโ Dockerfile.api # Multi-stage NestJS build
โโโ Dockerfile.web # Multi-stage Angular build + Nginx
โโโ docker-compose.yml # Full stack
โโโ docker-compose.prod.yml # Production overrides
โโโ nginx.conf # Nginx configuration
AWS
infrastructure/
โโโ terraform/ # Infrastructure as code
โ โโโ main.tf
โ โโโ variables.tf
โ โโโ outputs.tf
โโโ ecs/
โ โโโ task-definition.json
โโโ scripts/
โโโ deploy.sh # Deployment script
Kubernetes
k8s/
โโโ helm/
โ โโโ myapp/
โ โโโ Chart.yaml
โ โโโ values.yaml
โ โโโ values.prod.yaml
โ โโโ templates/
โ โโโ api-deployment.yaml
โ โโโ web-deployment.yaml
โ โโโ service.yaml
โ โโโ ingress.yaml
โ โโโ configmap.yaml
โ โโโ secrets.yaml
โโโ skaffold.yaml # Local development
Docker deployment (recommended for self-hosted)
Build and run
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml up -d
docker compose -f docker/docker-compose.yml -f docker/docker-compose.prod.yml up -d
Production docker-compose.prod.yml
version: '3.8'
services:
api:
environment:
- NODE_ENV=production
deploy:
replicas: 2
resources:
limits:
memory: 512M
restart: always
web:
deploy:
replicas: 2
restart: always
db:
volumes:
- /data/postgres:/var/lib/postgresql/data
restart: always
Environment-specific configuration
API environment
NODE_ENV=production
DATABASE_HOST=db
DATABASE_PORT=5432
DATABASE_USERNAME=myapp
DATABASE_PASSWORD=${DB_PASSWORD}
DATABASE_NAME=myapp_prod
JWT_SECRET=${JWT_SECRET}
JWT_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d
CORS_ORIGINS=https://myapp.com
API_PORT=3000
LOG_LEVEL=info
Angular environment
export const environment = {
production: true,
apiUrl: '/api',
};
Workflow
- Run pre-deployment checklist
- Fix any blockers found
- Create deployment configuration for target
- Verify builds succeed
- Test in staging environment
- Document deployment steps
- Set up monitoring and alerts
Output
- Checklist results (pass/fail)
- Files created
- Next steps for deployment
- Environment variables needed in production
- Monitoring setup instructions
Reference
For platform-specific configurations, see reference/nean-deploy-reference.md