Local Development Setup
Docker Compose configuration for local development.
Prerequisites
- Docker & Docker Compose installed
- Neon account (https://neon.tech) - for database
- Ports available: 80, 6379, 5001, 3000, 3001, 8080
Initial Setup
1. Setup Neon Database
# Run setup script
./scripts/db/setup-neon.sh
# Or manually:
# 1. Create Neon project at https://neon.tech
# 2. Get connection string from main branch
# 3. Create deployments/local/.env.local:
# DATABASE_URL=postgresql://user:pass@ep-xxx.region.neon.tech/dbname?sslmode=require&pgbouncer=true
See Neon Setup Guide for details.
2. Start Services
# Start infrastructure (Redis, Traefik - no PostgreSQL needed)
docker-compose up -d
# Run migrations
./scripts/db/migrate.sh auth-service dev
# Seed database (optional)
./scripts/db/seed.sh auth-service
Usage
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
# Stop and remove volumes (clean slate)
docker-compose down -v
Services
- Neon Database: Cloud-hosted (no local container)
- Redis:
localhost:6379 - Auth Service:
localhost:5001 - Web Admin:
http://localhost:3000orhttp://admin.localhost - Web Client:
http://localhost:3001orhttp://localhost - Traefik Dashboard:
http://localhost:8080
Access
- API Gateway:
http://localhost/api/v1 - Web Admin:
http://admin.localhost(via Traefik) orhttp://localhost:3000(direct) - Web Client:
http://localhost(via Traefik) orhttp://localhost:3001(direct) - Traefik Dashboard:
http://localhost:8080
Environment Variables
Copy env.local.example to .env.local and add your Neon DATABASE_URL:
DATABASE_URL=postgresql://user:pass@ep-xxx.region.neon.tech/dbname?sslmode=require&pgbouncer=true
Note: PostgreSQL is not included in Docker Compose. All environments use Neon database.