92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
services:
|
|
clickhouse:
|
|
image: clickhouse:lts
|
|
environment:
|
|
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
|
|
CLICKHOUSE_PASSWORD: chpassword
|
|
CLICKHOUSE_USER: chuser
|
|
ports:
|
|
- "18123:8123" # ClickHouse HTTP port exposed to local machine on 18123
|
|
- "19000:9000" # ClickHouse native port exposed to local machine on 19000
|
|
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
|
|
|
|
gateway:
|
|
image: tensorzero/gateway
|
|
build:
|
|
context: ../..
|
|
dockerfile: crates/gateway/Dockerfile
|
|
target: 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:
|
|
GCP_VERTEX_CREDENTIALS_PATH: ${GCP_VERTEX_CREDENTIALS_PATH:+/app/gcp-credentials.json}
|
|
TENSORZERO_CLICKHOUSE_URL: http://chuser:chpassword@clickhouse:8123/tensorzero
|
|
env_file:
|
|
- ${ENV_FILE:-.env}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "13000:3000" # Gateway port exposed to local machine on 13000
|
|
depends_on:
|
|
clickhouse:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: wget http://gateway:3000/health
|
|
start_period: 30s
|
|
start_interval: 1s
|
|
timeout: 1s
|
|
|
|
ui:
|
|
image: tensorzero/ui
|
|
environment:
|
|
TENSORZERO_GATEWAY_URL: http://gateway:3000
|
|
env_file:
|
|
- ${ENV_FILE:-.env}
|
|
ports:
|
|
- "14000:4000" # UI port exposed to local machine on 14000
|
|
depends_on:
|
|
gateway:
|
|
condition: service_healthy
|
|
|
|
nginx:
|
|
image: openresty/openresty:alpine
|
|
volumes:
|
|
- ./nginx/nginx.conf.template:/etc/nginx/nginx.conf.template
|
|
- ./nginx/entrypoint.sh:/entrypoint.sh
|
|
- ./nginx/modify_body.lua:/modify_body.lua
|
|
environment:
|
|
API_TOKEN: ${API_TOKEN}
|
|
USER: ${USER}
|
|
env_file:
|
|
- ${ENV_FILE:-.env}
|
|
command: /bin/sh -c "/entrypoint.sh openresty -g 'daemon off;'"
|
|
depends_on:
|
|
gateway:
|
|
condition: service_healthy
|
|
|
|
ngrok:
|
|
image: ngrok/ngrok:latest
|
|
depends_on:
|
|
nginx:
|
|
condition: service_started
|
|
env_file:
|
|
- ${ENV_FILE:-.env}
|
|
command: http nginx:80
|
|
ports:
|
|
- "4040:4040" # ngrok port exposed to local machine on 4040
|
|
|
|
volumes:
|
|
clickhouse-data:
|