# Using the deployment script (recommended)
./scripts/deploy-local.sh development up
# Or using Docker Compose directly
docker compose up -d- Frontend: http://localhost
- Admin Panel: http://localhost/admin
- Backend API: http://localhost:3000
- Health Check: http://localhost:3000/health
- Metrics: http://localhost:3000/metrics
# All services
docker compose logs -f
# Specific service
docker compose logs -f backend
docker compose logs -f frontend
docker compose logs -f admin./scripts/deploy-local.sh development down
# Or
docker compose downThe scripts/deploy-local.sh script provides convenient commands:
./scripts/deploy-local.sh development up./scripts/deploy-local.sh development down./scripts/deploy-local.sh development restart./scripts/deploy-local.sh development rebuild./scripts/deploy-local.sh development status./scripts/deploy-local.sh development test./scripts/deploy-local.sh development clean# Uses .env.development
./scripts/deploy-local.sh development up# Uses .env.production
./scripts/deploy-local.sh production upThe deployment script automatically runs health checks:
- ✅ Backend health endpoint
- ✅ Frontend accessibility
- ✅ Admin panel accessibility
# Find process using port 3000
lsof -ti:3000 | xargs kill -9
# Or use different ports in .env
PORT=3001# Check database logs
docker compose logs database
# Restart database
docker compose restart database# Stop and remove all containers, volumes, networks
docker compose down -v --remove-orphans
# Remove all images
docker compose down --rmi all
# Rebuild and start
docker compose build --no-cache
docker compose up -dThe .github/workflows/local-dev.yml workflow tests local deployment:
# Triggered on:
- Pull requests
- Feature branch pushes# Trigger via GitHub Actions
gh workflow run ci-cd.yml -f environment=local# Edit code
vim backend/src/app.js# Rebuild specific service
docker compose build backend
# Restart service
docker compose restart backend# Run tests
docker compose exec backend npm test
# Check logs
docker compose logs -f backendgit add .
git commit -m "feat: add new feature"
git push origin feature/new-featureAlternative to the deployment script:
# Start services
make up
# Stop services
make down
# View logs
make logs
# Run tests
make test
# Clean up
make clean| Service | Port | Description |
|---|---|---|
| database | 5432 | PostgreSQL 16 |
| backend | 3000 | Express.js API |
| frontend | 80 | React frontend |
| admin | 80 | React admin panel |
| gateway | 80 | Nginx reverse proxy |
Configured in docker-compose.yml:
| Service | CPU | Memory |
|---|---|---|
| database | 1.0 | 1GB |
| backend | 0.5 | 512MB |
| frontend | 0.5 | 512MB |
| admin | 0.5 | 512MB |
| gateway | 0.5 | 512MB |
- Development: Use local deployment for development
- Staging: Push to
developbranch for staging deployment - Production: Push to
mainbranch for production deployment