# This is a simplified example for learning purposes. Do not use this in production. # For production-ready deployments, see: https://www.tensorzero.com/docs/gateway/deployment services: clickhouse: image: clickhouse:lts environment: CLICKHOUSE_USER: chuser CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 CLICKHOUSE_PASSWORD: chpassword ports: - "8123:8123" # HTTP port - "9000:9000" # Native port volumes: - clickhouse-data:/var/lib/clickhouse healthcheck: test: wget --spider --tries 1 http://chuser:chpassword@clickhouse:8123/ping start_period: 30s start_interval: 1s timeout: 1s gateway: image: tensorzero/gateway volumes: - ./config:/app/config:ro - ${GCP_VERTEX_CREDENTIALS_PATH:-/dev/null}:/app/gcp-credentials.json:ro command: --config-file /app/config/tensorzero.toml environment: OPENAI_API_KEY: ${OPENAI_API_KEY:?Environment variable OPENAI_API_KEY must be set.} # ... and any other relevant API credentials ... TENSORZERO_CLICKHOUSE_URL: http://chuser:chpassword@clickhouse:8123/tensorzero ports: - "3000:3000" extra_hosts: - "host.docker.internal:host-gateway" healthcheck: test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health", ] start_period: 1s start_interval: 1s timeout: 1s depends_on: clickhouse: condition: service_healthy ui: image: tensorzero/ui environment: TENSORZERO_GATEWAY_URL: http://gateway:3000 ports: - "4000:4000" depends_on: gateway: condition: service_healthy evaluations: profiles: [evaluations] # this service won't run by default with `docker compose up` image: tensorzero/evaluations volumes: - ./config:/app/config:ro environment: OPENAI_API_KEY: ${OPENAI_API_KEY:?Environment variable OPENAI_API_KEY must be set.} # ... and any other relevant API credentials ... TENSORZERO_CLICKHOUSE_URL: http://chuser:chpassword@clickhouse:8123/tensorzero extra_hosts: - "host.docker.internal:host-gateway" depends_on: clickhouse: condition: service_healthy volumes: clickhouse-data: