Skip to content

Docker Compose

This deployment lives in apps/backend/docker-compose/ and provides a simple way to run Flow-Like on a single machine.

┌─────────────────────────────────────────────────────────────────────────────┐
│ Docker Compose Network │
├─────────────────────────────────────────────────────────────────────────────┤
│ Core Services: │
│ ┌─────────────┐ ┌─────────────────────────────────────────────────┐ │
│ │ API │────▶│ Execution Runtime │ │
│ │ Container │ │ (Server Mode - handles multiple jobs) │ │
│ │ :8080 │◀────│ :9000 │ │
│ └─────────────┘ └─────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ PostgreSQL │ │
│ │ :5432 │ │
│ └─────────────┘ │
├─────────────────────────────────────────────────────────────────────────────┤
│ Monitoring (optional): │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Prometheus │ │ Grafana │ │
│ │ :9091 │ │ :3002 │ │
│ └─────────────┘ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────┐
│ External Storage │
│ (S3/Azure/GCP/R2) │
└─────────────────────┘
ServiceDescriptionPort
apiMain Flow-Like API service8080
runtimeShared execution environment9000
postgresPostgreSQL database5432
db-initOne-time migration job
prometheusMetrics collection (optional)9091
grafanaDashboards (optional)3002
Terminal window
cd apps/backend/docker-compose
cp .env.example .env
# Edit .env with your storage credentials
# Generate JWT keypair for execution trust
../../tools/gen-execution-keys.sh
# Start core services
docker compose up -d
# Or include monitoring
docker compose --profile monitoring up -d

Enable optional Prometheus + Grafana monitoring:

Terminal window
docker compose --profile monitoring up -d

Access Grafana at http://localhost:3002 (default: admin/admin).

Monitoring Guide

This Docker Compose setup uses shared execution where a single runtime container handles multiple jobs concurrently. This is suitable for:

  • Development and testing
  • Trusted workloads
  • High-throughput scenarios with controlled input

For stronger isolation (one container per execution), consider: