Deploy with Docker

Prerequisites

  • Docker Engine 24+
  • Policy bundle JSON (policy.json) for standalone mode

Standalone mode

docker run -d \
  --name fairvisor \
  --restart unless-stopped \
  -p 8080:8080 \
  -v "$(pwd)/policy.json:/etc/fairvisor/policy.json:ro" \
  -e FAIRVISOR_MODE=decision_service \
  -e FAIRVISOR_CONFIG_FILE=/etc/fairvisor/policy.json \
  ghcr.io/fairvisor/edge:latest

SaaS mode

docker run -d \
  --name fairvisor \
  --restart unless-stopped \
  -p 8080:8080 \
  -e FAIRVISOR_MODE=decision_service \
  -e FAIRVISOR_SAAS_URL=https://api.fairvisor.com \
  -e FAIRVISOR_EDGE_ID=<EDGE_ID> \
  -e FAIRVISOR_EDGE_TOKEN=<EDGE_TOKEN> \
  ghcr.io/fairvisor/edge:latest

Compose example

services:
  fairvisor:
    image: ghcr.io/fairvisor/edge:latest
    ports:
      - "8080:8080"
    environment:
      FAIRVISOR_MODE: decision_service
      FAIRVISOR_CONFIG_FILE: /etc/fairvisor/policy.json
    volumes:
      - ./policy.json:/etc/fairvisor/policy.json:ro

Health endpoints

Endpoint Description
GET /livez Liveness
GET /readyz Readiness
GET /metrics Prometheus metrics