chore: Remove nginx - use direct Caddy routing
- Remove nginx service from docker-compose - Services bind to localhost:3000/3001 only - Add Caddy configuration guide - Update README with simplified structure - External reverse proxy handles SSL/routing
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user