82 lines
2.2 KiB
YAML
82 lines
2.2 KiB
YAML
# 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
|
|
ulimits:
|
|
nofile:
|
|
soft: 262144
|
|
hard: 262144
|
|
healthcheck:
|
|
test: wget --spider --tries 1 http://chuser:chpassword@clickhouse:8123/ping
|
|
start_period: 30s
|
|
start_interval: 1s
|
|
timeout: 1s
|
|
|
|
postgres:
|
|
image: postgres:14-alpine
|
|
environment:
|
|
POSTGRES_DB: tensorzero
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: pg_isready -U postgres
|
|
start_period: 30s
|
|
start_interval: 1s
|
|
timeout: 1s
|
|
|
|
gateway:
|
|
image: tensorzero/gateway
|
|
volumes:
|
|
- ./config:/app/config:ro
|
|
command: --config-file /app/config/tensorzero.toml
|
|
environment:
|
|
TENSORZERO_CLICKHOUSE_URL: http://chuser:chpassword@clickhouse:8123/tensorzero
|
|
TENSORZERO_POSTGRES_URL: postgres://postgres:postgres@postgres:5432/tensorzero
|
|
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:?Environment variable ANTHROPIC_API_KEY must be set.}
|
|
ports:
|
|
- "3000:3000"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
healthcheck:
|
|
test: wget --spider --tries 1 http://localhost:3000/status
|
|
start_period: 30s
|
|
start_interval: 1s
|
|
timeout: 1s
|
|
depends_on:
|
|
clickhouse:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
ui:
|
|
image: tensorzero/ui
|
|
environment:
|
|
TENSORZERO_POSTGRES_URL: postgres://postgres:postgres@postgres:5432/tensorzero
|
|
TENSORZERO_GATEWAY_URL: http://gateway:3000
|
|
ports:
|
|
- "4000:4000"
|
|
depends_on:
|
|
gateway:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres-data:
|
|
clickhouse-data:
|