| name | docker-vigil-orchestration |
| description | Docker Compose orchestration for Vigil Guard v2.0.0 microservices (11 services). Use when deploying services, managing containers, troubleshooting Docker network issues, working with vigil-net, configuring docker-compose.yml, handling service dependencies, or working with 3-branch detection services (heuristics, semantic, prompt-guard). |
| version | 2.0.0 |
| allowed-tools | ["Read","Write","Bash","Grep","Glob"] |
Docker Orchestration for Vigil Guard v2.0.0
Overview
Multi-service Docker deployment orchestration for Vigil Guard's 3-branch parallel detection architecture with 11 microservices.
When to Use This Skill
- Starting/stopping services
- Debugging container issues
- Managing Docker network (vigil-net)
- Modifying docker-compose.yml
- Viewing service logs
- Checking service health
- Troubleshooting port conflicts
- Understanding service dependencies
- Managing 3-branch detection services
Service Architecture (v2.0.0)
All Services (11 containers)
services:
heuristics-service:
semantic-service:
prompt-guard-api:
presidio-pii-api:
language-detector:
n8n:
web-ui-backend:
web-ui-frontend:
clickhouse:
grafana:
caddy:
Service Ports
| Service | Internal Port | External Port | Purpose |
|---|
| heuristics-service | 5005 | 5005 | Branch A detection |
| semantic-service | 5006 | 5006 | Branch B detection |
| prompt-guard-api | 8000 | 8000 | Branch C detection |
| presidio-pii-api | 5001 | 5001 | PII detection |
| language-detector | 5002 | 5002 | Language detection |
| n8n | 5678 | 5678 | Workflow engine |
| web-ui-backend | 8787 | 8787 | Config API |
| web-ui-frontend | 80 | - | React UI (via Caddy) |
| clickhouse | 8123, 9000 | 8123, 9000 | Analytics DB |
| grafana | 3000 | 3001 | Monitoring |
| caddy | 80, 443 | 80, 443 | Reverse proxy |
Docker Network
All services communicate via vigil-net external network.
Internal hostnames:
heuristics-service (Branch A)
semantic-service (Branch B)
prompt-guard-api (Branch C)
vigil-presidio-pii or presidio-pii-api
vigil-language-detector or language-detector
vigil-clickhouse or clickhouse
vigil-n8n or n8n
web-ui-backend
web-ui-frontend
Service Dependencies (Startup Order)
vigil-net (network)
│
┌─────────────────────┼─────────────────────┐
│ │ │
clickhouse grafana caddy
│
├── heuristics-service
├── semantic-service (depends: clickhouse)
├── prompt-guard-api
│
├── presidio-pii-api
├── language-detector
│
└── n8n (depends: all detection services)
│
└── web-ui-backend (depends: n8n, clickhouse)
│
└── web-ui-frontend
Common Commands
Start All Services
docker-compose up -d
Start Services by Function
docker-compose up -d heuristics-service semantic-service prompt-guard-api
docker-compose up -d presidio-pii-api language-detector
docker-compose up -d clickhouse grafana
docker-compose up -d web-ui-backend web-ui-frontend caddy
docker-compose up -d n8n
View Logs
docker-compose logs -f
docker-compose logs -f heuristics-service
docker-compose logs --tail=100 n8n
docker-compose logs -f heuristics-service semantic-service prompt-guard-api
Restart Services
docker-compose restart
docker-compose restart heuristics-service
docker-compose restart heuristics-service semantic-service prompt-guard-api
Stop and Remove
docker-compose down
docker-compose down -v
Rebuild After Changes
docker-compose up --build -d
docker-compose up --build -d heuristics-service
docker-compose build --no-cache heuristics-service
Service Health Checks
Check Running Containers
docker ps
Test Service Endpoints
curl http://localhost:5005/health
curl http://localhost:5006/health
curl http://localhost:8000/health
curl http://localhost:5001/health
curl http://localhost:5002/health
curl http://localhost:5678/healthz
curl http://localhost:8123/ping
curl -I http://localhost:3001
curl http://localhost:8787/api/files
curl -I http://localhost/ui/
Check All Services Script
#!/bin/bash
services=(
"5005:Heuristics"
"5006:Semantic"
"8000:LLM Guard"
"5001:Presidio"
"5002:Language"
"5678:n8n"
"8123:ClickHouse"
"3001:Grafana"
"8787:Backend"
)
for svc in "${services[@]}"; do
port="${svc%%:*}"
name="${svc##*:}"
if curl -s "http://localhost:$port/health" > /dev/null 2>&1; then
echo "✅ $name (:$port)"
else
echo "❌ $name (:$port)"
fi
done
Docker Network
Inspect Network
docker network inspect vigil-net
Create Network (if missing)
docker network create vigil-net
Test Inter-Service Connectivity
docker exec vigil-n8n curl -s http://heuristics-service:5005/health
docker exec vigil-n8n curl -s http://semantic-service:5006/health
docker exec vigil-n8n curl -s http://prompt-guard-api:8000/health
Volume Management
List Volumes
docker volume ls | grep vigil
Backup Volumes
docker run --rm -v vigil_clickhouse_data:/data -v $(pwd):/backup alpine tar czf /backup/clickhouse-backup.tar.gz /data
docker run --rm -v vigil_n8n_data:/data -v $(pwd):/backup alpine tar czf /backup/n8n-backup.tar.gz /data
docker run --rm -v vigil_semantic_data:/data -v $(pwd):/backup alpine tar czf /backup/semantic-backup.tar.gz /data
Remove Volumes (DESTRUCTIVE!)
docker volume rm vigil_clickhouse_data
Troubleshooting
Port Already in Use
lsof -i :5005
kill -9 <PID>
Service Won't Start
docker-compose logs heuristics-service
docker network inspect vigil-net
docker-compose config
docker-compose ps
Container Crashes
docker logs --tail=100 heuristics-service
docker ps -a | grep vigil
docker inspect heuristics-service
Network Issues
docker-compose down
docker network rm vigil-net
docker network create vigil-net
docker-compose up -d
Branch Timeout Issues
docker exec vigil-clickhouse clickhouse-client -q "
SELECT
avg(branch_a_timing_ms) as a_avg,
avg(branch_b_timing_ms) as b_avg,
avg(branch_c_timing_ms) as c_avg
FROM n8n_logs.events_processed
WHERE timestamp > now() - INTERVAL 1 HOUR
"
docker stats heuristics-service semantic-service prompt-guard-api
Environment Variables
Loaded from .env file:
CLICKHOUSE_USER=admin
CLICKHOUSE_PASSWORD=<auto-generated>
GF_SECURITY_ADMIN_PASSWORD=<auto-generated>
SESSION_SECRET=<auto-generated>
JWT_SECRET=<auto-generated>
HEURISTICS_PORT=5005
HEURISTICS_TIMEOUT=1000
SEMANTIC_PORT=5006
SEMANTIC_TIMEOUT=2000
EMBEDDING_MODEL=all-MiniLM-L6-v2
PROMPT_GUARD_PORT=8000
PROMPT_GUARD_TIMEOUT=3000
Development vs Production
Development (individual services)
cd services/web-ui/backend && npm run dev
cd services/web-ui/frontend && npm run dev
cd services/heuristics-service && npm run dev
cd services/semantic-service && python app.py
Production (Docker)
docker-compose up --build -d
./scripts/status.sh
Monitoring Resources
Container Stats
docker stats
Disk Usage
docker system df
Prune Unused Resources
docker system prune
docker system prune -a --volumes
Related Skills
n8n-vigil-workflow - 24-node workflow service
clickhouse-grafana-monitoring - Database management
pattern-library-manager - Heuristics patterns
presidio-pii-specialist - PII detection service
References
- Docker Compose:
docker-compose.yml
- Heuristics:
services/heuristics-service/
- Semantic:
services/semantic-service/
- Environment:
.env
Version History
- v2.0.0 (Current): 11 services, 3-branch architecture
- v1.6.11: 9 services (no heuristics, no semantic)
- v1.6.0: Added presidio-pii-api, language-detector