Docker Setup
Purple8 Builder is fully containerised. This page covers the complete Docker setup for both development and production.
Container overview
nginx (80/443)
├── frontend (8080) Vue 3 SPA
└── api-gateway (8081)
├── agents-service (8001) 58+ specialist agents
├── workflow-service (8002) pipeline orchestration
├── purple8-graph (8100) knowledge graph + embeddings
├── postgres (5434) primary data store
├── redis (6381) session cache + memory tier 1
├── rabbitmq (5672/15672) async task queue
└── minio (9000/9001) artifact object storage
sandbox-py312 ×4 isolated Python 3.12 runners
sandbox-node20 ×4 isolated Node 20 runnersPort reference
| Container | External port | Purpose |
|---|---|---|
| nginx | 80, 443 | Reverse proxy |
| frontend | 8080 | Vue 3 SPA |
| api-gateway | 8081 | API + auth + routing |
| agents-service | 8001 | Agent execution |
| workflow-service | 8002 | Pipeline orchestration |
| purple8-graph | 8100 | Knowledge graph engine |
| postgres | 5434 | PostgreSQL |
| redis | 6381 | Cache & memory |
| rabbitmq | 5672 / 15672 | AMQP + management UI |
| minio | 9000 / 9001 | Object store + console |
Development
bash
docker compose up -d # start all services
docker compose ps # check status
docker compose logs -f api-gateway # follow a service log
docker compose up -d --build frontend # rebuild after code change
docker compose down # stop everythingProduction
bash
docker compose -f docker-compose.prod.yml up -dThe production compose adds resource limits, restart policies, and log rotation.
Pre-production checklist
- [ ] Strong
JWT_SECRET(≥32 random chars):openssl rand -hex 32 - [ ] All passwords changed from dev defaults
- [ ]
ENVIRONMENT=productionset in.env - [ ] TLS certificates in
nginx/ - [ ] PostgreSQL volume backup configured
- [ ] Port 15672 (RabbitMQ UI) firewalled
Scaling
Scale agent workers for concurrent builds:
bash
docker compose up -d --scale agents-service=4
docker compose up -d --scale sandbox-py312=8 --scale sandbox-node20=8Database migrations
bash
# Applied automatically on first start — run manually if needed
docker compose exec api-gateway alembic upgrade headBackup & restore
bash
# Backup
docker compose exec postgres pg_dump -U purple8 purple8 \
| gzip > backup_$(date +%Y%m%d).sql.gz
# Restore
gunzip -c backup_20260301.sql.gz \
| docker compose exec -T postgres psql -U purple8 purple8Troubleshooting
bash
# Container won't start
docker compose logs <service_name>
# Reset everything (destructive — deletes all data)
docker compose down -v && docker compose up -d