Skip to content

Latest commit

Β 

History

History
119 lines (81 loc) Β· 2.88 KB

File metadata and controls

119 lines (81 loc) Β· 2.88 KB

πŸš€ NextStep Docker Quick Start

Overview

Your NextStep application has been successfully dockerized! This setup provides:

  • Backend: .NET 9.0 API (Port 7010)
  • Frontend: React/Vite with Nginx (Port 8080)
  • Database: SQLite (Persisted via Docker volume)
  • Security: Non-root containers, proper CORS, health checks
  • Cloud-Ready: Works with AWS ECS, Azure Container Apps, Kubernetes

πŸƒβ€β™‚οΈ Quick Start

Option 1: PowerShell (Windows)

.\deploy.ps1

Option 2: Docker Compose (Any OS)

docker-compose up -d

Option 3: Production Mode

docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

🌐 Access Your Application

πŸ“ Files Created

Docker Files

  • backend/Dockerfile - Backend container configuration
  • frontend/Dockerfile - Frontend container configuration
  • frontend/nginx.conf - Nginx configuration for frontend
  • docker-compose.yml - Main orchestration file
  • docker-compose.prod.yml - Production overrides

Configuration

  • backend/appsettings.Production.json - Production backend config
  • .env.example - Environment variables template
  • backend/.dockerignore & frontend/.dockerignore - Build optimization

Scripts & Documentation

  • deploy.ps1 - PowerShell deployment script
  • deploy.sh - Bash deployment script
  • DOCKER-DEPLOYMENT.md - Comprehensive deployment guide

πŸ”§ Key Features

Container Communication

  • Services communicate using internal network (nextstep-network)
  • Frontend connects to backend via http://backend:7010
  • No localhost dependencies between containers

Security

  • Non-root user execution
  • Proper CORS configuration
  • Security headers in Nginx
  • Resource limits in production

Cloud Deployment Ready

  • Works seamlessly with AWS ECS, Azure Container Apps, Kubernetes
  • Environment variable based configuration
  • Health checks for orchestration platforms
  • Volume persistence for database

🚨 Common Commands

# Start application
docker-compose up -d

# View logs
docker-compose logs -f

# Stop application
docker-compose down

# Rebuild after code changes
docker-compose build
docker-compose up -d

# Clean restart (removes database)
docker-compose down -v
docker-compose up -d

🌩️ Cloud Deployment

The application is cloud-ready! See DOCKER-DEPLOYMENT.md for detailed instructions on deploying to:

  • AWS ECS
  • Azure Container Apps
  • Kubernetes
  • Any container orchestration platform

πŸ†˜ Need Help?

  1. Check DOCKER-DEPLOYMENT.md for detailed documentation
  2. View logs: docker-compose logs
  3. Test connectivity: docker-compose exec frontend wget -qO- http://backend:7010/health

Your application is now fully containerized and ready for production deployment! πŸŽ‰