Docker Deployment

Run Flo with Docker and Docker Compose.

Docker Image

docker pull ghcr.io/floruntime/flo:latest

Quick Start

docker run -d \
  --name flo \
  -p 9000:9000 \
  -p 9001:9001 \
  -p 9002:9002 \
  -v flo-data:/data \
  ghcr.io/floruntime/flo:latest
PortPurpose
9000Binary wire protocol (client traffic)
9001Prometheus metrics
9002Dashboard REST API

Docker Compose — Single Node

version: "3.8"
services:
  flo:
    image: ghcr.io/floruntime/flo:latest
    ports:
      - "9000:9000"
      - "9001:9001"
      - "9002:9002"
    volumes:
      - flo-data:/data
    environment:
      - FLO_DATA_DIR=/data
      - FLO_PORT=9000
    restart: unless-stopped
 
volumes:
  flo-data:

Docker Compose — 3-Node Cluster

version: "3.8"
services:
  flo-1:
    image: ghcr.io/floruntime/flo:latest
    hostname: flo-1
    ports:
      - "9000:9000"
      - "9001:9001"
      - "9002:9002"
    environment:
      - FLO_DATA_DIR=/data
      - FLO_PORT=9000
      - FLO_CLUSTER_SEEDS=flo-2:9000,flo-3:9000
      - FLO_NODE_ID=1
    volumes:
      - flo-1-data:/data
 
  flo-2:
    image: ghcr.io/floruntime/flo:latest
    hostname: flo-2
    ports:
      - "9010:9000"
      - "9011:9001"
      - "9012:9002"
    environment:
      - FLO_DATA_DIR=/data
      - FLO_PORT=9000
      - FLO_CLUSTER_SEEDS=flo-1:9000,flo-3:9000
      - FLO_NODE_ID=2
    volumes:
      - flo-2-data:/data
 
  flo-3:
    image: ghcr.io/floruntime/flo:latest
    hostname: flo-3
    ports:
      - "9020:9000"
      - "9021:9001"
      - "9022:9002"
    environment:
      - FLO_DATA_DIR=/data
      - FLO_PORT=9000
      - FLO_CLUSTER_SEEDS=flo-1:9000,flo-2:9000
      - FLO_NODE_ID=3
    volumes:
      - flo-3-data:/data
 
volumes:
  flo-1-data:
  flo-2-data:
  flo-3-data:

Environment Variables

All flo.toml settings can be overridden with FLO_ prefixed environment variables:

VariableDefaultDescription
FLO_DATA_DIR./dataData directory path
FLO_PORT9000Client protocol port
FLO_METRICS_PORT9001Prometheus metrics port
FLO_DASHBOARD_PORT9002Dashboard REST API port
FLO_SHARD_COUNTCPU countNumber of shard threads
FLO_NODE_IDautoUnique node identifier
FLO_CLUSTER_SEEDSComma-separated seed node addresses
FLO_LOG_LEVELinfoLogging level (debug, info, warn, err)

Health Check

healthcheck:
  test: ["CMD", "flo", "server", "status"]
  interval: 10s
  timeout: 5s
  retries: 3

Volumes and Data Persistence

Always mount a volume at /data to persist data across container restarts:

docker volume create flo-data
docker run -v flo-data:/data ghcr.io/floruntime/flo:latest

The data directory structure:

/data/
├── {shard_id}/
│   ├── uat/{partition_id}/      # UAL segments
│   ├── snapshots/{partition_id}/ # Projection snapshots
│   └── ts/{partition_id}/       # Time-series columnar files
└── flo.toml                     # Config (if not using env vars)

Building the Image

cd flo
docker build -t flo:custom .