mirror of
https://github.com/hanzoai/stack.git
synced 2026-11-19 03:06:57 +00:00
925 lines
28 KiB
YAML
925 lines
28 KiB
YAML
# Hanzo Stack - Complete OSS Infrastructure
|
|
# Local development with all services
|
|
|
|
services:
|
|
# =============================================================================
|
|
# CORE DATABASES
|
|
# =============================================================================
|
|
|
|
postgres:
|
|
image: ghcr.io/hanzoai/sql:latest
|
|
container_name: hanzo-postgres
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER:-hanzo}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-hanzo123}
|
|
- POSTGRES_DB=${POSTGRES_DB:-hanzo}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-hanzo}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
redis:
|
|
image: ghcr.io/hanzoai/kv:latest
|
|
container_name: hanzo-redis
|
|
command: redis-server --requirepass ${REDIS_PASSWORD:-hanzo123}
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-hanzo123}", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# DocDB - MongoDB wire protocol via FerretDB + PostgreSQL backend
|
|
docdb-pg:
|
|
image: ghcr.io/hanzoai/sql:latest
|
|
container_name: hanzo-docdb-pg
|
|
environment:
|
|
- POSTGRES_USER=${MONGO_USERNAME:-hanzo}
|
|
- POSTGRES_PASSWORD=${MONGO_PASSWORD:-hanzo123}
|
|
- POSTGRES_DB=${MONGO_DATABASE:-hanzo}
|
|
volumes:
|
|
- docdb_pg_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${MONGO_USERNAME:-hanzo}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
docdb:
|
|
image: ghcr.io/hanzoai/docdb:latest
|
|
container_name: hanzo-docdb
|
|
environment:
|
|
- FERRETDB_POSTGRESQL_URL=postgres://${MONGO_USERNAME:-hanzo}:${MONGO_PASSWORD:-hanzo123}@docdb-pg:5432/${MONGO_DATABASE:-hanzo}
|
|
ports:
|
|
- "${MONGO_PORT:-27017}:27017"
|
|
depends_on:
|
|
docdb-pg:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--port", "27017", "--eval", "db.adminCommand('ping')"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# =============================================================================
|
|
# NEW OSS DATABASES
|
|
# =============================================================================
|
|
|
|
# Qdrant - Vector Database for AI/ML embeddings
|
|
vector:
|
|
image: qdrant/qdrant:latest
|
|
container_name: hanzo-vector
|
|
volumes:
|
|
- qdrant_data:/qdrant/storage
|
|
ports:
|
|
- "${QDRANT_PORT:-6333}:6333"
|
|
- "${QDRANT_GRPC_PORT:-6334}:6334"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:6333/readyz"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Valkey - Redis-compatible KV store (Redis fork)
|
|
kv:
|
|
image: valkey/valkey:7-alpine
|
|
container_name: hanzo-kv
|
|
command: valkey-server --requirepass ${VALKEY_PASSWORD:-hanzo123}
|
|
volumes:
|
|
- valkey_data:/data
|
|
ports:
|
|
- "${VALKEY_PORT:-6380}:6379"
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "-a", "${VALKEY_PASSWORD:-hanzo123}", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# FerretDB - MongoDB-compatible document database (uses PostgreSQL)
|
|
documentdb:
|
|
image: ferretdb/ferretdb:latest
|
|
container_name: hanzo-documentdb
|
|
environment:
|
|
- FERRETDB_POSTGRESQL_URL=postgres://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_ferret?sslmode=disable
|
|
ports:
|
|
- "${FERRETDB_PORT:-27018}:27017"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "mongosh", "--port", "27017", "--eval", "db.runCommand('ping').ok"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# MinIO - S3-compatible object storage
|
|
storage:
|
|
image: minio/minio:latest
|
|
container_name: hanzo-storage
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minioadmin}
|
|
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin}
|
|
volumes:
|
|
- minio_data:/data
|
|
ports:
|
|
- "${MINIO_PORT:-9000}:9000"
|
|
- "${MINIO_CONSOLE_PORT:-9001}:9001"
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Meilisearch - Full-text search engine
|
|
search:
|
|
image: getmeili/meilisearch:latest
|
|
container_name: hanzo-search-engine
|
|
environment:
|
|
- MEILI_ENV=${MEILI_ENV:-development}
|
|
- MEILI_MASTER_KEY=${MEILISEARCH_MASTER_KEY:-hanzo-meili-master-key}
|
|
- MEILI_NO_ANALYTICS=true
|
|
volumes:
|
|
- meilisearch_data:/meili_data
|
|
ports:
|
|
- "${MEILISEARCH_PORT:-7700}:7700"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# =============================================================================
|
|
# EXECUTION LAYER
|
|
# =============================================================================
|
|
|
|
# Temporal - Workflow Orchestration Engine
|
|
tasks:
|
|
image: temporalio/auto-setup:latest
|
|
container_name: hanzo-tasks
|
|
environment:
|
|
- DB=postgresql
|
|
- DB_PORT=5432
|
|
- POSTGRES_USER=${POSTGRES_USER:-hanzo}
|
|
- POSTGRES_PWD=${POSTGRES_PASSWORD:-hanzo123}
|
|
- POSTGRES_SEEDS=postgres
|
|
- DYNAMIC_CONFIG_FILE_PATH=/etc/temporal/dynamicconfig/dynamicconfig.yaml
|
|
volumes:
|
|
- ./config/temporal-dynamicconfig.yaml:/etc/temporal/dynamicconfig/dynamicconfig.yaml:ro
|
|
ports:
|
|
- "${TEMPORAL_PORT:-7233}:7233"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "tctl", "--address", "localhost:7233", "cluster", "health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Temporal Web UI
|
|
tasks-ui:
|
|
image: temporalio/ui:latest
|
|
container_name: hanzo-tasks-ui
|
|
environment:
|
|
- TEMPORAL_ADDRESS=tasks:7233
|
|
- TEMPORAL_CORS_ORIGINS=http://localhost:${TEMPORAL_UI_PORT:-8088}
|
|
ports:
|
|
- "${TEMPORAL_UI_PORT:-8088}:8080"
|
|
depends_on:
|
|
- tasks
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Cron - Temporal Worker for Scheduled Workflows
|
|
cron:
|
|
image: ghcr.io/hanzoai/cron:latest
|
|
container_name: hanzo-cron
|
|
environment:
|
|
- TEMPORAL_ADDRESS=tasks:7233
|
|
- TEMPORAL_NAMESPACE=default
|
|
depends_on:
|
|
tasks:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# NATS - High-Performance Message Queue (Apache 2.0)
|
|
pubsub:
|
|
image: nats:2.10-alpine
|
|
container_name: hanzo-pubsub
|
|
command:
|
|
- "--jetstream"
|
|
- "--store_dir=/data"
|
|
- "--http_port=8222"
|
|
ports:
|
|
- "${NATS_PORT:-4222}:4222"
|
|
- "${NATS_HTTP_PORT:-8222}:8222"
|
|
volumes:
|
|
- pubsub_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8222/healthz"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Queues - NATS JetStream Consumer for Work Queues
|
|
queues:
|
|
image: ghcr.io/hanzoai/queues:latest
|
|
container_name: hanzo-queues
|
|
environment:
|
|
- NATS_URL=nats://pubsub:4222
|
|
depends_on:
|
|
pubsub:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Nuclio - Serverless Functions Platform
|
|
functions:
|
|
image: quay.io/nuclio/dashboard:stable-amd64
|
|
container_name: hanzo-functions
|
|
environment:
|
|
- NUCLIO_DASHBOARD_EXTERNAL_IP_ADDRESSES=localhost
|
|
- NUCLIO_DASHBOARD_REGISTRY_URL=${NUCLIO_REGISTRY_URL:-}
|
|
- NUCLIO_DASHBOARD_RUN_REGISTRY_URL=${NUCLIO_RUN_REGISTRY_URL:-}
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
ports:
|
|
- "${NUCLIO_PORT:-8070}:8070"
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# =============================================================================
|
|
# OBSERVABILITY STACK
|
|
# =============================================================================
|
|
|
|
# Loki - Log aggregation
|
|
logs:
|
|
image: grafana/loki:latest
|
|
container_name: hanzo-logs
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
volumes:
|
|
- loki_data:/loki
|
|
ports:
|
|
- "${LOKI_PORT:-3100}:3100"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3100/ready"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Tempo - Distributed tracing backend
|
|
traces:
|
|
image: grafana/tempo:latest
|
|
container_name: hanzo-traces
|
|
command: ["-config.file=/etc/tempo.yaml"]
|
|
volumes:
|
|
- ./config/tempo.yaml:/etc/tempo.yaml:ro
|
|
- tempo_data:/tmp/tempo
|
|
ports:
|
|
- "${TEMPO_PORT:-3200}:3200"
|
|
- "${TEMPO_OTLP_GRPC:-4320}:4317"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3200/ready"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# OpenTelemetry Collector - Unified telemetry pipeline
|
|
telemetry:
|
|
image: otel/opentelemetry-collector:latest
|
|
container_name: hanzo-telemetry
|
|
command: ["--config=/etc/otel-collector-config.yaml"]
|
|
volumes:
|
|
- ./config/otel-collector.yaml:/etc/otel-collector-config.yaml:ro
|
|
ports:
|
|
- "${OTEL_GRPC_PORT:-4317}:4317"
|
|
- "${OTEL_HTTP_PORT:-4318}:4318"
|
|
- "${OTEL_METRICS_PORT:-8888}:8888"
|
|
depends_on:
|
|
- logs
|
|
- traces
|
|
- metrics
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:13133/"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# VictoriaMetrics - Time-series database for metrics
|
|
metrics:
|
|
image: victoriametrics/victoria-metrics:latest
|
|
container_name: hanzo-metrics
|
|
command:
|
|
- "--storageDataPath=/victoria-metrics-data"
|
|
- "--httpListenAddr=:8428"
|
|
- "--retentionPeriod=30d"
|
|
volumes:
|
|
- victoria_data:/victoria-metrics-data
|
|
ports:
|
|
- "${VICTORIA_PORT:-8428}:8428"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8428/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Grafana - Observability dashboards
|
|
dashboards:
|
|
image: grafana/grafana:latest
|
|
container_name: hanzo-dashboards
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER:-admin}
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD:-hanzo123}
|
|
- GF_INSTALL_PLUGINS=grafana-clickhouse-datasource
|
|
- GF_SERVER_ROOT_URL=http://localhost:${GRAFANA_DASHBOARD_PORT:-3001}
|
|
- GF_SERVER_HTTP_PORT=3000
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
- GF_AUTH_ANONYMOUS_ENABLED=true
|
|
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
|
|
ports:
|
|
- "${GRAFANA_DASHBOARD_PORT:-3001}:3000"
|
|
depends_on:
|
|
- logs
|
|
- traces
|
|
- metrics
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Insights - Product analytics (Hanzo Insights)
|
|
insights:
|
|
image: ghcr.io/hanzoai/insights:1.51.1
|
|
container_name: hanzo-insights
|
|
environment:
|
|
- DATABASE_URL=postgres://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_insights
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- SECRET_KEY=${INSIGHTS_SECRET:-hanzo-insights-secret-key-change-me}
|
|
- SITE_URL=http://localhost:${INSIGHTS_PORT:-8010}
|
|
- DISABLE_SECURE_SSL_REDIRECT=true
|
|
- IS_BEHIND_PROXY=false
|
|
- CLICKHOUSE_HOST=datastore
|
|
- CLICKHOUSE_DATABASE=${DATASTORE_DB:-analytics}
|
|
- CLICKHOUSE_USER=${DATASTORE_USER:-hanzo}
|
|
- CLICKHOUSE_PASSWORD=${DATASTORE_PASSWORD:-hanzo123}
|
|
ports:
|
|
- "${INSIGHTS_PORT:-8010}:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
datastore:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/_health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# =============================================================================
|
|
# EXISTING INFRASTRUCTURE (kept from original)
|
|
# =============================================================================
|
|
|
|
# Hanzo Datastore - Analytics Data Warehouse (Apache 2.0)
|
|
datastore:
|
|
image: hanzoai/datastore-server:latest
|
|
container_name: hanzo-datastore
|
|
environment:
|
|
- DATASTORE_DB=${DATASTORE_DB:-analytics}
|
|
- DATASTORE_USER=${DATASTORE_USER:-hanzo}
|
|
- DATASTORE_PASSWORD=${DATASTORE_PASSWORD:-hanzo123}
|
|
- DATASTORE_DEFAULT_ACCESS_MANAGEMENT=1
|
|
volumes:
|
|
- datastore_data:/var/lib/hanzo-datastore
|
|
- datastore_logs:/var/log/hanzo-datastore-server
|
|
ports:
|
|
- "${DATASTORE_HTTP_PORT:-8123}:8123"
|
|
- "${DATASTORE_NATIVE_PORT:-9009}:9000"
|
|
healthcheck:
|
|
test: ["CMD", "hanzo-datastore-client", "--query", "SELECT 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# KMS - luxfi/kms (Go/ZAP, embedded ZapDB). No Postgres/Redis/Node/Infisical.
|
|
# Local dev: ZAP disabled (ZAP_PORT=0) → secrets-only, no consensus/luxd needed.
|
|
# (v1.11.x gates the consensus authorizer behind ZAP, so ZAP_PORT=0 boots clean.)
|
|
kms:
|
|
image: ghcr.io/luxfi/kms:1.11.9
|
|
container_name: hanzo-kms
|
|
environment:
|
|
- ZAP_PORT=0
|
|
# local dev only, not a real key — fixed 32-byte base64 dev values
|
|
- KMS_MASTER_KEY_B64=aGFuem8tbG9jYWwtZGV2LWttcy1tYXN0ZXIta2V5ISE=
|
|
- KMS_ENCRYPTION_KEY_B64=aGFuem8tbG9jYWwtZGV2LWttcy1lbmNyeXB0a2V5ISE=
|
|
ports:
|
|
- "${KMS_PORT:-8071}:8080"
|
|
volumes:
|
|
- kms_data:/data/kms
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:8080/healthz"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Host - multi-tenant Base hosting (MIT)
|
|
host:
|
|
image: ghcr.io/hanzoai/host:latest
|
|
container_name: hanzo-host
|
|
environment:
|
|
- PH_HOME=/data
|
|
- PH_MOTHERSHIP_URL=http://host:3001
|
|
- PH_EDGE_APEX_DOMAIN=${HOST_APEX_DOMAIN:-hanzo.local}
|
|
- PH_EDGE_SSL=${HOST_SSL:-false}
|
|
- PH_MOTHERSHIP_ADMIN_USERNAME=${HOST_ADMIN_USERNAME:-admin}
|
|
- PH_MOTHERSHIP_ADMIN_PASSWORD=${HOST_ADMIN_PASSWORD:-admin}
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_host
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
volumes:
|
|
- host_data:/data
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
ports:
|
|
- "${HOST_MOTHERSHIP_PORT:-3090}:3001"
|
|
- "${HOST_EDGE_PORT:-8090}:8090"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# =============================================================================
|
|
# HANZO SERVICES
|
|
# =============================================================================
|
|
|
|
router:
|
|
image: ghcr.io/hanzoai/router:latest
|
|
container_name: hanzo-router
|
|
ports:
|
|
- "${ROUTER_PORT:-4000}:4000"
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- MASTER_KEY=${ROUTER_MASTER_KEY:-sk-router-master-hanzo}
|
|
# LLM Provider Keys (from .env)
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
|
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
|
|
- VERTEX_PROJECT=${VERTEX_PROJECT}
|
|
- VERTEX_LOCATION=${VERTEX_LOCATION}
|
|
- TOGETHER_API_KEY=${TOGETHER_API_KEY}
|
|
- MISTRAL_API_KEY=${MISTRAL_API_KEY}
|
|
- PERPLEXITY_API_KEY=${PERPLEXITY_API_KEY}
|
|
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}
|
|
- XAI_API_KEY=${XAI_API_KEY}
|
|
- GROQ_API_KEY=${GROQ_API_KEY}
|
|
- COHERE_API_KEY=${COHERE_API_KEY}
|
|
- REPLICATE_API_KEY=${REPLICATE_API_KEY}
|
|
- HUGGINGFACE_API_KEY=${HUGGINGFACE_API_KEY}
|
|
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
|
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
|
- AWS_REGION=${AWS_REGION:-us-east-1}
|
|
- AZURE_API_KEY=${AZURE_API_KEY}
|
|
- AZURE_API_BASE=${AZURE_API_BASE}
|
|
- AZURE_API_VERSION=${AZURE_API_VERSION}
|
|
# Router Configuration
|
|
- LLM_MODE=PRODUCTION
|
|
- DATABASE_SCHEMA_NAME=hanzo_router
|
|
- STORE_MODEL_IN_DB=true
|
|
- LLM_DROP_PARAMS=true
|
|
- LLM_LOCAL_MODEL_COST_MAP=true
|
|
- SET_VERBOSE=true
|
|
- ACTIONS_SEED_ENABLED=true
|
|
- UI_USERNAME=${ROUTER_UI_USERNAME:-admin}
|
|
- UI_PASSWORD=${ROUTER_UI_PASSWORD:-admin}
|
|
- CUSTOM_EXTENSIONS_PATH=/app/extensions.py
|
|
volumes:
|
|
- ./config/router-config.yaml:/app/config.yaml:ro
|
|
- ./config/router-extensions.py:/app/extensions.py:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
command: ["--config", "/app/config.yaml", "--port", "4000", "--telemetry", "False"]
|
|
networks:
|
|
- hanzo-network
|
|
|
|
chat:
|
|
image: ghcr.io/hanzoai/chat:latest
|
|
container_name: hanzo-chat
|
|
ports:
|
|
- "${CHAT_PORT:-3081}:3080"
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_chat
|
|
- MONGO_URI=mongodb://${MONGO_USERNAME:-hanzo}:${MONGO_PASSWORD:-hanzo123}@mongodb:27017/${MONGO_DATABASE:-hanzo}?authSource=admin
|
|
- MEILI_URL=http://search:7700
|
|
- MEILI_MASTER_KEY=${MEILISEARCH_MASTER_KEY:-hanzo-meili-master-key}
|
|
- ROUTER_URL=http://router:4000/v1
|
|
- ALLOW_SOCIAL_LOGIN=false
|
|
- CREDS_IV=${CREDS_IV}
|
|
- CREDS_KEY=${CREDS_KEY}
|
|
- JWT_SECRET=${JWT_SECRET:-your-jwt-secret}
|
|
- JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET:-your-refresh-secret}
|
|
- DOMAIN_CLIENT=http://localhost:3081
|
|
- DOMAIN_SERVER=http://localhost:3081
|
|
- NO_INDEX=true
|
|
- DEBUG_LOGGING=true
|
|
- DEBUG_CONSOLE=true
|
|
- SEARCH_ENABLED=false
|
|
- REGISTRATION_ENABLED=true
|
|
- CHECK_BALANCE=false
|
|
- TITLE_CONVO=true
|
|
- CUSTOM_FOOTER="Powered by Hanzo AI"
|
|
- HELP_AND_FAQ_URL=https://hanzo.ai/help
|
|
- SHOW_BIRTHDAY_ICON=false
|
|
- ALLOW_MESSAGE_EDITING=true
|
|
- ALLOW_MESSAGE_DELETION=true
|
|
- ALLOW_UNVERIFIED_EMAIL_LOGIN=true
|
|
- APP_TITLE=Hanzo Chat
|
|
- ENDPOINTS=router
|
|
volumes:
|
|
- chat_uploads:/app/uploads
|
|
depends_on:
|
|
mongodb:
|
|
condition: service_healthy
|
|
search:
|
|
condition: service_healthy
|
|
router:
|
|
condition: service_started
|
|
networks:
|
|
- hanzo-network
|
|
|
|
analytics:
|
|
image: ghcr.io/hanzoai/analytics:3.0.4
|
|
container_name: hanzo-analytics
|
|
ports:
|
|
- "${ANALYTICS_PORT:-3010}:3000"
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_analytics
|
|
- DATASTORE_URL=http://datastore:8123
|
|
- DATASTORE_DB=${DATASTORE_DB:-analytics}
|
|
- DATASTORE_USER=${DATASTORE_USER:-hanzo}
|
|
- DATASTORE_PASSWORD=${DATASTORE_PASSWORD:-hanzo123}
|
|
- NEXTAUTH_URL=http://localhost:3010
|
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:-your-nextauth-secret}
|
|
- APP_SECRET=${ANALYTICS_SECRET:-analytics-secret-change-me}
|
|
- DISABLE_SIGNUPS=false
|
|
- DISABLE_TELEMETRY=1
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
datastore:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
ide:
|
|
image: ghcr.io/hanzoai/ide:latest
|
|
container_name: hanzo-ide
|
|
ports:
|
|
- "${IDE_PORT:-3005}:3001"
|
|
environment:
|
|
- LLM_API_KEY=${ROUTER_MASTER_KEY:-sk-router-master-hanzo}
|
|
- LLM_BASE_URL=http://router:4000
|
|
- WORKSPACE_MOUNT_PATH=/workspace
|
|
- SANDBOX_USER_ID=1000
|
|
- USE_HOST_NETWORK=false
|
|
- RUN_AS_OPENHANDS=true
|
|
- RUNTIME_CONTAINER_IMAGE=ghcr.io/hanzoai/runtime:latest
|
|
- SANDBOX_TYPE=exec
|
|
- WORKSPACE_BASE=/workspace
|
|
- MOUNT_WORKSPACE=true
|
|
- MOUNT_CACHE=true
|
|
- CACHE_DIR=/tmp/cache
|
|
- BROWSERGYM_CDN=https://browser-use-api-experimental.netlify.app
|
|
- INIT_PLUGINS=codeact,jupyter,swe_agent
|
|
volumes:
|
|
- ./workspace:/workspace
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
depends_on:
|
|
router:
|
|
condition: service_started
|
|
networks:
|
|
- hanzo-network
|
|
|
|
runtime:
|
|
image: ghcr.io/hanzoai/runtime:latest
|
|
container_name: hanzo-runtime
|
|
ports:
|
|
- "${RUNTIME_PORT:-3003}:8080"
|
|
environment:
|
|
- RUNTIME_CONTAINER_IMAGE=ghcr.io/hanzoai/runtime:latest
|
|
- DOCKER_HOST=unix:///var/run/docker.sock
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- hanzo-network
|
|
|
|
iam:
|
|
image: ghcr.io/hanzoai/iam:1.1000.1
|
|
container_name: hanzo-iam
|
|
ports:
|
|
- "${IAM_PORT:-8000}:8000"
|
|
environment:
|
|
- driverName=postgres
|
|
- dataSourceName=user=${POSTGRES_USER:-hanzo} password=${POSTGRES_PASSWORD:-hanzo123} host=postgres port=5432 sslmode=disable dbname=${POSTGRES_DB:-hanzo}_iam
|
|
- appname=Hanzo IAM
|
|
- httpport=8000
|
|
- runmode=dev
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Flow - Visual Workflow Builder (MIT - LangFlow fork)
|
|
flow:
|
|
image: ghcr.io/hanzoai/flow:latest
|
|
container_name: hanzo-flow
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_flow
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- ROUTER_URL=http://router:4000/v1
|
|
- ROUTER_API_KEY=${ROUTER_MASTER_KEY:-sk-router-master-hanzo}
|
|
- PORT=3006
|
|
ports:
|
|
- "${FLOW_PORT:-3006}:3006"
|
|
volumes:
|
|
- flow_data:/app/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
router:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3006/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Search App - AI-Powered Search Engine (MIT - Morphic fork)
|
|
search-app:
|
|
image: ghcr.io/hanzoai/search:1.37.0
|
|
container_name: hanzo-search-app
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_search
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- ROUTER_URL=http://router:4000
|
|
- ROUTER_API_KEY=${ROUTER_MASTER_KEY:-sk-router-master-hanzo}
|
|
- NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|
ports:
|
|
- "${SEARCH_APP_PORT:-3000}:3000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
router:
|
|
condition: service_started
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Console - Cloud Dashboard & Admin UI
|
|
console:
|
|
image: ghcr.io/hanzoai/console:3.156.7
|
|
container_name: hanzo-console
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_console
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- ROUTER_URL=http://router:4000
|
|
- ANALYTICS_URL=http://analytics:3000
|
|
- DATASTORE_URL=http://datastore:8123
|
|
- IAM_URL=http://iam:8000
|
|
- NEXT_PUBLIC_APP_URL=http://localhost:3091
|
|
- PORT=3001
|
|
ports:
|
|
- "${CONSOLE_PORT:-3091}:3001"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
router:
|
|
condition: service_started
|
|
analytics:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
retries: 3
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Gateway - API Gateway & Proxy (MIT)
|
|
gateway:
|
|
image: ghcr.io/hanzoai/gateway:2.14.1
|
|
container_name: hanzo-gateway
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3030
|
|
- ROUTER_URL=http://router:4000
|
|
- IAM_URL=http://iam:8000
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- GATEWAY_IDENTITY=did:hanzo:gateway
|
|
ports:
|
|
- "${GATEWAY_PORT:-3030}:3030"
|
|
depends_on:
|
|
router:
|
|
condition: service_started
|
|
iam:
|
|
condition: service_started
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Prometheus - Metrics Collection (Apache 2.0)
|
|
prometheus:
|
|
image: prom/prometheus:v2.48.0
|
|
container_name: hanzo-prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.enable-lifecycle'
|
|
- '--web.enable-remote-write-receiver'
|
|
volumes:
|
|
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus_data:/prometheus
|
|
ports:
|
|
- "${PROMETHEUS_PORT:-9090}:9090"
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Promtail - Log Shipper for Loki (AGPL-3.0)
|
|
promtail:
|
|
image: grafana/promtail:2.9.3
|
|
container_name: hanzo-promtail
|
|
command: -config.file=/etc/promtail/promtail-config.yml
|
|
volumes:
|
|
- ./config/promtail-config.yml:/etc/promtail/promtail-config.yml:ro
|
|
- /var/log:/var/log:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
depends_on:
|
|
- logs
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Cloud - API Backend & Knowledge Base (Apache 2.0 - Casibase fork)
|
|
cloud:
|
|
image: ghcr.io/hanzoai/cloud:1.783.1
|
|
container_name: hanzo-cloud
|
|
environment:
|
|
- RUNNING_IN_DOCKER=true
|
|
- driverName=postgres
|
|
- dataSourceName=user=${POSTGRES_USER:-hanzo} password=${POSTGRES_PASSWORD:-hanzo123} host=postgres port=5432 sslmode=disable dbname=${POSTGRES_DB:-hanzo}_cloud
|
|
- redisEndpoint=redis:6379
|
|
- redisPassword=${REDIS_PASSWORD:-hanzo123}
|
|
- httpport=8000
|
|
ports:
|
|
- "${CLOUD_PORT:-8080}:8000"
|
|
volumes:
|
|
- cloud_files:/files
|
|
- cloud_logs:/logs
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# Platform - PaaS Deployment Platform with Built-in Proxy (Apache 2.0 - Dokploy fork)
|
|
platform:
|
|
image: ghcr.io/hanzoai/platform:latest
|
|
container_name: hanzo-platform
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-hanzo}:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/${POSTGRES_DB:-hanzo}_platform
|
|
- REDIS_URL=redis://:${REDIS_PASSWORD:-hanzo123}@redis:6379
|
|
- SECRET_KEY=${PLATFORM_SECRET_KEY:-your-platform-secret-key}
|
|
- NODE_ENV=production
|
|
- DOMAIN=${DOMAIN:-hanzo.local}
|
|
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:[email protected]}
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "${PLATFORM_PORT:-3002}:3000"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- platform_data:/app/.platform
|
|
- platform_certs:/etc/letsencrypt
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- hanzo-network
|
|
|
|
# =============================================================================
|
|
# VOLUMES
|
|
# =============================================================================
|
|
|
|
volumes:
|
|
# Core databases
|
|
postgres_data:
|
|
redis_data:
|
|
docdb_pg_data:
|
|
|
|
# New OSS databases
|
|
qdrant_data:
|
|
valkey_data:
|
|
minio_data:
|
|
meilisearch_data:
|
|
|
|
# Analytics
|
|
datastore_data:
|
|
datastore_logs:
|
|
|
|
# Observability
|
|
loki_data:
|
|
tempo_data:
|
|
victoria_data:
|
|
grafana_data:
|
|
prometheus_data:
|
|
|
|
# Execution layer
|
|
pubsub_data:
|
|
|
|
# Services
|
|
host_data:
|
|
chat_uploads:
|
|
flow_data:
|
|
cloud_files:
|
|
cloud_logs:
|
|
platform_data:
|
|
platform_certs:
|
|
kms_data:
|
|
|
|
# =============================================================================
|
|
# NETWORKS
|
|
# =============================================================================
|
|
|
|
networks:
|
|
hanzo-network:
|
|
external: true
|