102 lines
3.0 KiB
YAML
102 lines
3.0 KiB
YAML
include:
|
|
- docker-compose-common.yml
|
|
|
|
services:
|
|
clickhouse:
|
|
image: clickhouse:${TENSORZERO_CLICKHOUSE_VERSION:-lts}
|
|
environment:
|
|
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
|
|
CLICKHOUSE_PASSWORD: chpassword
|
|
CLICKHOUSE_USER: chuser
|
|
ports:
|
|
- "8123:8123" # HTTP port
|
|
- "9000:9000" # Native port
|
|
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
|
|
|
|
gateway:
|
|
image: tensorzero/gateway:${TENSORZERO_GATEWAY_TAG:-latest}
|
|
build:
|
|
context: ../..
|
|
dockerfile: crates/gateway/Dockerfile
|
|
target: gateway
|
|
args:
|
|
PROFILE: dev
|
|
volumes:
|
|
- ./config:/app/config:ro
|
|
# Mount GCP JWT key file (optional - only needed for GCP providers)
|
|
- ${GCP_CREDENTIALS_PATH:-../../gcp_jwt_key.json}:/app/gcp_jwt_key.json:ro
|
|
environment:
|
|
GCP_VERTEX_CREDENTIALS_PATH: /app/gcp_jwt_key.json
|
|
GOOGLE_APPLICATION_CREDENTIALS: /app/gcp_jwt_key.json
|
|
TENSORZERO_CLICKHOUSE_URL: http://chuser:chpassword@clickhouse:8123/tensorzero_ui_fixtures
|
|
TENSORZERO_POSTGRES_URL: postgres://postgres:postgres@postgres:5432/tensorzero_ui_fixtures
|
|
env_file:
|
|
- .env
|
|
- path: .env-gateway
|
|
required: false
|
|
ports:
|
|
- "3000:3000"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
- "howdy.tensorzero.com:127.0.0.1"
|
|
depends_on:
|
|
clickhouse:
|
|
condition: service_healthy
|
|
gateway-postgres-migrations:
|
|
condition: service_healthy
|
|
command: --config-file ${TENSORZERO_GATEWAY_CONFIG:-'/app/config/tensorzero.toml'}
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"wget",
|
|
"--no-verbose",
|
|
"--tries=1",
|
|
"--spider",
|
|
"http://localhost:3000/health",
|
|
]
|
|
start_period: 30s
|
|
start_interval: 1s
|
|
timeout: 1s
|
|
|
|
fixtures:
|
|
build:
|
|
context: ../../
|
|
dockerfile: ui/fixtures/Dockerfile
|
|
volumes:
|
|
- .:/fixtures
|
|
- ~/.aws:/root/.aws
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
|
|
CLICKHOUSE_HOST: clickhouse
|
|
CLICKHOUSE_PASSWORD: chpassword
|
|
CLICKHOUSE_USER: chuser
|
|
R2_ACCESS_KEY_ID: ${R2_ACCESS_KEY_ID:-}
|
|
R2_SECRET_ACCESS_KEY: ${R2_SECRET_ACCESS_KEY:-}
|
|
TENSORZERO_DOWNLOAD_FIXTURES_WITHOUT_CREDENTIALS: ${TENSORZERO_DOWNLOAD_FIXTURES_WITHOUT_CREDENTIALS:-}
|
|
depends_on:
|
|
gateway:
|
|
condition: service_healthy
|
|
postgres:
|
|
condition: service_healthy
|
|
gateway-postgres-migrations:
|
|
condition: service_healthy
|
|
command: ["bash", "-c", "cd /fixtures && ./load_fixtures.sh"]
|
|
healthcheck:
|
|
test: ["CMD", "test", "-f", "/load_complete.marker"]
|
|
interval: 5s
|
|
timeout: 1s
|
|
retries: 72 # Retry for up to 6 minutes
|
|
start_interval: 1s
|
|
start_period: 300s # Give the script time to start
|