Build and Deployment
How do I create a production build?
How do I create a production build?
api/dist directory.Web frontend build:web/dist directory.How do I run in a production environment?
How do I run in a production environment?
Environment Variables
How do I set environment variables?
How do I set environment variables?
.env.{environment} files based on NODE_ENV.Create .env.production file:SONAMU_DB_* environment variables to automatically configure DB connections, so you donβt need to specify connection details directly in sonamu.config.ts. Use database.defaultOptions to override defaults:How do I securely manage sensitive information?
How do I securely manage sensitive information?
- AWS Secrets Manager
- HashiCorp Vault
- Azure Key Vault
Database
How do I run production database migrations?
How do I run production database migrations?
How do I set up database backups?
How do I set up database backups?
Monitoring and Logging
How do I set up logging?
How do I set up logging?
How do I create a health check endpoint?
How do I create a health check endpoint?
How do I set up error monitoring?
How do I set up error monitoring?
Performance Optimization
How do I optimize production performance?
How do I optimize production performance?
How do I set up static file caching?
How do I set up static file caching?
Docker
How do I deploy with Docker?
How do I deploy with Docker?
CI/CD
How do I set up automatic deployment with GitHub Actions?
How do I set up automatic deployment with GitHub Actions?
Security
How do I set up HTTPS?
How do I set up HTTPS?
How do I configure CORS?
How do I configure CORS?
How do I set up Rate Limiting?
How do I set up Rate Limiting?
Best Practices
Production checklist
Production checklist
- HTTPS configured
- Sensitive info managed via environment variables
- CORS properly configured
- Rate Limiting set up
- SQL Injection prevention (using Puri)
- XSS prevention (input validation)
- Connection Pool optimized
- Redis caching enabled
- Static file caching
- DB indexes optimized
- N+1 queries eliminated
- Health check endpoint
- Error monitoring (Sentry)
- Log collection (Winston)
- DB backup automation
- Production environment variables set
- Migration tested (Shadow DB)
- CI/CD pipeline
- Rollback plan