1.1 KiB
1.1 KiB
Distributed Hindsight Setup
Run API and Control Plane as separate containers.
Start
cd services
docker-compose up
Access:
- Control Plane: http://localhost:3000
- API: http://localhost:8888
What's Running
Two separate containers:
api- Hindsight API with embedded pg0 databasecontrol-plane- Web UI
Build Images
./build-all.sh
Creates:
hindsight/api:latesthindsight/control-plane:latest
Configuration
The API uses embedded pg0 by default. Database files are stored in the api_data volume.
To use an external PostgreSQL database, add to docker-compose.yml:
services:
api:
environment:
HINDSIGHT_API_DATABASE_URL: postgresql://user:pass@host:5432/db
Data Persistence
docker-compose down -v # Remove volumes
Why Use This?
The distributed setup is useful when you want to:
- Scale API and UI independently
- Use an external database in production
- Deploy to Kubernetes/orchestration
- Run UI on different infrastructure
For simple deployments, use the main docker-compose.yml (standalone all-in-one).