195 lines
5.5 KiB
YAML
195 lines
5.5 KiB
YAML
name: helicone-self-host
|
|
|
|
services:
|
|
# =============================================================================
|
|
# INFRASTRUCTURE SERVICES
|
|
# =============================================================================
|
|
|
|
db:
|
|
image: postgres:17.4
|
|
container_name: helicone-postgres
|
|
environment:
|
|
POSTGRES_DB: helicone
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-testpassword}
|
|
ports:
|
|
- "54388:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:24.3.13.40
|
|
container_name: helicone-clickhouse
|
|
ports:
|
|
- "18123:8123"
|
|
- "19000:9000"
|
|
volumes:
|
|
- clickhouse_data:/var/lib/clickhouse
|
|
ulimits:
|
|
nofile:
|
|
soft: 262144
|
|
hard: 262144
|
|
environment:
|
|
CLICKHOUSE_DEFAULT_USER: default
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1",
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
minio:
|
|
image: minio/minio
|
|
container_name: helicone-minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
volumes:
|
|
- minio_data:/data
|
|
command: server /data --console-address ":9001"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 5s
|
|
|
|
minio-setup:
|
|
image: minio/mc:RELEASE.2025-04-08T15-39-49Z
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
/usr/bin/mc alias set localminio http://minio:9000 ${MINIO_ROOT_USER:-minioadmin} ${MINIO_ROOT_PASSWORD:-minioadmin};
|
|
/usr/bin/mc mb --ignore-existing localminio/request-response-storage;
|
|
/usr/bin/mc mb --ignore-existing localminio/prompt-body-storage;
|
|
/usr/bin/mc mb --ignore-existing localminio/hql-store;
|
|
exit 0;
|
|
"
|
|
|
|
mailhog:
|
|
image: mailhog/mailhog
|
|
container_name: mailhog
|
|
ports:
|
|
- "1025:1025"
|
|
- "8025:8025"
|
|
|
|
redis:
|
|
image: redis:8.0.2-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6379:6379"
|
|
environment:
|
|
- REDIS_PASSWORD=${REDIS_PASSWORD:-helicone-redis-pw}
|
|
- REDIS_PORT=6379
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 5s
|
|
|
|
migrations:
|
|
image: git.puddi.ng/public-infra/misc-images/helicone-migrations:latest
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
clickhouse:
|
|
condition: service_healthy
|
|
environment:
|
|
FLYWAY_URL: jdbc:postgresql://db:5432/helicone
|
|
FLYWAY_USER: postgres
|
|
FLYWAY_PASSWORD: ${POSTGRES_PASSWORD:-testpassword}
|
|
CLICKHOUSE_HOST: http://clickhouse:8123
|
|
CLICKHOUSE_USER: default
|
|
|
|
# =============================================================================
|
|
# HELICONE CORE SERVICES
|
|
# =============================================================================
|
|
|
|
jawn:
|
|
container_name: helicone-jawn
|
|
image: git.puddi.ng/public-infra/misc-images/helicone-jawn:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- ${JAWN_PORT:-8585}:${JAWN_PORT:-8585}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
clickhouse:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
migrations:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
PORT: ${JAWN_PORT:-8585}
|
|
NEXT_PUBLIC_BETTER_AUTH: "true"
|
|
S3_ENDPOINT: http://minio:9000
|
|
S3_ACCESS_KEY: ${MINIO_ROOT_USER:-minioadmin}
|
|
S3_SECRET_KEY: ${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
S3_BUCKET_NAME: "request-response-storage"
|
|
S3_PROMPT_BUCKET_NAME: "prompt-body-storage"
|
|
S3_ENDPOINT_PUBLIC: ${S3_ENDPOINT_PUBLIC:-http://localhost:9000}
|
|
CLICKHOUSE_CREDS: |
|
|
{
|
|
"CLICKHOUSE_HOST": "http://clickhouse:8123",
|
|
"CLICKHOUSE_USER": "default",
|
|
"CLICKHOUSE_PASSWORD": "",
|
|
"CLICKHOUSE_HQL_USER": "hql_user",
|
|
"CLICKHOUSE_HQL_PASSWORD": ""
|
|
}
|
|
VERCEL_ENV: ${VERCEL_ENV:-production}
|
|
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-your-secret-key}
|
|
SUPABASE_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-testpassword}@db:5432/helicone
|
|
|
|
web:
|
|
container_name: helicone-web
|
|
image: git.puddi.ng/public-infra/misc-images/helicone-web:latest
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
jawn:
|
|
condition: service_started
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
NEXT_PUBLIC_HELICONE_JAWN_SERVICE: ${JAWN_PUBLIC_URL:-http://localhost:8585}
|
|
DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD:-testpassword}@db:5432/helicone
|
|
CLICKHOUSE_HOST: http://clickhouse:8123
|
|
CLICKHOUSE_USER: default
|
|
CLICKHOUSE_PASSWORD: ""
|
|
VERCEL_ENV: ${VERCEL_ENV:-production}
|
|
SMTP_HOST: mailhog
|
|
SMTP_PORT: 1025
|
|
NEXT_PUBLIC_BETTER_AUTH: "true"
|
|
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-your-secret-key}
|
|
SMTP_SECURE: false
|
|
NODE_ENV: production
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
minio_data:
|
|
driver: local
|
|
clickhouse_data:
|
|
driver: local
|
|
|
|
networks:
|
|
traces:
|
|
driver: bridge
|