Skip to content

lolo-orsu/nestjs-docker

Repository files navigation

NestJS Docker

A Docker-based installer and development environment for the NestJS framework.

Install: Download and docker compose up

CI

Getting Started

  1. If not already done, install Docker Compose (v2.10+)
  2. Run docker compose build --pull --no-cache to build fresh images
  3. Run docker compose up --wait to start the project
  4. Open http://localhost:3000 in your browser
  5. Run docker compose down --remove-orphans to stop the containers

Features

  • 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

Documentation

Project Structure

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

Credits

Inspired by dunglas/symfony-docker.

License

MIT License

About

A Docker-based installer and development environment for NestJs. Install: download and `docker compose up`.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors