A Docker-based installer and development environment for the NestJS framework.
Install: Download and docker compose up
- If not already done, install Docker Compose (v2.10+)
- Run
docker compose build --pull --no-cacheto build fresh images - Run
docker compose up --waitto start the project - Open
http://localhost:3000in your browser - Run
docker compose down --remove-orphansto stop the containers
- Production-ready configuration
- Automatic NestJS project creation on first run
- Multi-stage Docker builds for optimized images
- Hot reloading in development
- PostgreSQL database with health checks
- Non-root user for security
- Health check endpoint
- Support for Prisma and TypeORM migrations
- Configuration Options
- Using with an Existing Project
- Adding Extra Services
- Deploying to Production
- Debugging with VS Code
- Using MySQL Instead of PostgreSQL
- Using the Makefile
- Troubleshooting
nestjs-docker/
├── .github/
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ ├── workflows/ # CI/CD workflows
│ └── PULL_REQUEST_TEMPLATE.md
├── docker/
│ └── docker-entrypoint.sh # Entrypoint script for container initialization
├── docs/ # Documentation
├── .dockerignore # Files to exclude from Docker build
├── .env.example # Example environment variables
├── compose.yaml # Base Docker Compose configuration
├── compose.override.yaml # Development overrides (auto-loaded)
├── compose.prod.yaml # Production overrides
├── Dockerfile # Multi-stage Docker build
└── Makefile # Convenience commands
Inspired by dunglas/symfony-docker.
MIT License