# Caddy Configuration Caddy handles SSL termination and routes to the application services. ## Caddyfile Example ```caddy coop.hobokenchicken.com { # Frontend (Next.js) handle_path /* { reverse_proxy localhost:3000 } # API routes handle_path /api/* { reverse_proxy localhost:3001 } # Webhooks handle_path /webhooks/* { reverse_proxy localhost:3001 } # WebSocket support handle_path /socket.io/* { reverse_proxy localhost:3001 } } ``` ## Docker Compose (no nginx) Services bind to localhost only (`127.0.0.1`): - **Frontend**: `127.0.0.1:3000` - **Backend**: `127.0.0.1:3001` - **Postgres**: `5432` (internal only) - **Redis**: `6379` (internal only) ## Start Stack ```bash # Start services docker-compose up -d # Verify curl http://localhost:3001/health ``` Caddy automatically provisions SSL and routes traffic.