Files
hive/docker-compose.yml
T

167 lines
4.8 KiB
YAML

services:
# Frontend - React application
honeycomb:
build:
context: ./honeycomb
target: production
args:
VITE_API_URL: ${VITE_API_URL:-http://localhost:4000}
container_name: honeycomb-frontend
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
hive:
condition: service_healthy
restart: unless-stopped
networks:
- honeycomb-network
# Backend - Hive API (LLM observability & control plane)
hive:
build:
context: ./hive
target: production
args:
NPM_TOKEN: ${NPM_TOKEN:-}
container_name: honeycomb-backend
ports:
- "${BACKEND_PORT:-4000}:4000"
environment:
- NODE_ENV=${NODE_ENV:-production}
- PORT=4000
- LOG_LEVEL=${LOG_LEVEL:-info}
# PostgreSQL (TimescaleDB)
- TSDB_PG_URL=postgresql://postgres:postgres@timescaledb:5432/aden_tsdb
# MongoDB
- MONGODB_URL=mongodb://mongodb:27017
- MONGODB_DBNAME=${MONGODB_DBNAME:-aden}
- MONGODB_ERP_DBNAME=${MONGODB_ERP_DBNAME:-erp}
# Redis
- REDIS_URL=redis://redis:6379
# Authentication
- JWT_SECRET=${JWT_SECRET:-change-me-in-production-use-min-32-chars}
- PASSPHRASE=${PASSPHRASE:-change-me-in-production}
# Hive backend URL for SDK quickstart documents
- HIVE_HOST=${HIVE_HOST:-http://localhost:4000}
depends_on:
timescaledb:
condition: service_healthy
mongodb:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://localhost:4000/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
restart: unless-stopped
networks:
- honeycomb-network
# TimescaleDB - Time series database for LLM metrics
timescaledb:
image: timescale/timescaledb:latest-pg16
container_name: honeycomb-timescaledb
ports:
- "${TSDB_PORT:-5432}:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=aden_tsdb
command: ["postgres", "-c", "log_min_messages=warning", "-c", "log_statement=none"]
volumes:
- timescaledb_data:/var/lib/postgresql/data
# Auto-run schema files on first startup (alphabetical order)
- ./hive/src/services/tsdb/00-init-timescaledb.sql:/docker-entrypoint-initdb.d/00-init-timescaledb.sql:ro
- ./hive/src/services/tsdb/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
- ./hive/src/services/tsdb/users_schema.sql:/docker-entrypoint-initdb.d/02-users.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d aden_tsdb"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- honeycomb-network
# MongoDB - Policies, pricing, and control configuration
mongodb:
image: mongo:7
container_name: honeycomb-mongodb
ports:
- "${MONGODB_PORT:-27017}:27017"
command: ["mongod", "--quiet", "--logpath", "/dev/null"]
volumes:
- mongodb_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- honeycomb-network
# Redis - Caching and Socket.IO adapter
redis:
image: redis:7-alpine
container_name: honeycomb-redis
ports:
- "${REDIS_PORT:-6379}:6379"
command: ["redis-server", "--loglevel", "warning"]
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
restart: unless-stopped
networks:
- honeycomb-network
# Aden Tools MCP Server - Python tools via Model Context Protocol
aden-tools-mcp:
build:
context: ./aden-tools
container_name: honeycomb-aden-tools-mcp
ports:
- "${ADEN_TOOLS_MCP_PORT:-4001}:4001"
environment:
- MCP_PORT=4001
# Pass through tool-specific env vars
- BRAVE_SEARCH_API_KEY=${BRAVE_SEARCH_API_KEY:-}
volumes:
- .:/workspace:rw # Mount project root for file access
working_dir: /workspace # Set working directory so relative paths work
command: ["python", "/app/mcp_server.py"] # Use absolute path since working_dir changed
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:4001/health').raise_for_status()"]
interval: 30s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- honeycomb-network
networks:
honeycomb-network:
driver: bridge
volumes:
timescaledb_data:
mongodb_data:
redis_data: