Files
chat/compose.dev.yml
Hanzo Dev cb1bf0e258 feat: Add GitHub Actions workflow for Docker builds
- Add docker-publish.yml workflow for ghcr.io
- Add production-ready Dockerfile (if missing)
- Enable automated builds on push to main
- Support for semantic versioning tags
2025-07-23 23:06:15 -05:00

105 lines
2.7 KiB
YAML

# Hanzo AI Chat - Development Override
# Use with: docker compose -f compose.yml -f compose.dev.yml up
# This mounts source code for live development
services:
# Override chat service for development
chat:
build:
context: .
dockerfile: docker/Dockerfile.dev
volumes:
# Mount source code for hot reloading
- ./api:/app/api:cached
- ./client:/app/client:cached
- ./packages:/app/packages:cached
- ./config:/app/config:cached
# Exclude node_modules
- /app/node_modules
- /app/api/node_modules
- /app/client/node_modules
environment:
# Development settings
NODE_ENV: development
DEBUG: ${DEBUG:-true}
# Hot reload
CHOKIDAR_USEPOLLING: true
WATCHPACK_POLLING: true
command: npm run dev
# Optional: Local Hanzo Router for development
router:
image: hanzoai/llm:latest
container_name: hanzo-router
ports:
- "4000:4000"
environment:
# Database
DATABASE_URL: postgresql://hanzo:${POSTGRES_PASSWORD:-hanzo123}@postgres:5432/hanzo_router
# Redis
REDIS_URL: redis://:${REDIS_PASSWORD:-hanzosecret}@redis:6379
# LLM Keys (at least one required)
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
OPENAI_API_KEY: ${OPENAI_REALKEY:-}
TOGETHER_API_KEY: ${TOGETHER_API_KEY:-}
# Router Settings
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:-sk-hanzo-local-dev}
UI_USERNAME: ${UI_USERNAME:-admin}
UI_PASSWORD: ${UI_PASSWORD:-admin}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- hanzo-network
profiles:
- with-router
# PostgreSQL for Router (only if using local router)
postgres:
image: postgres:16-alpine
container_name: hanzo-postgres
environment:
POSTGRES_USER: hanzo
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-hanzo123}
POSTGRES_DB: hanzo_router
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- hanzo-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hanzo"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- with-router
# Redis for Router (only if using local router)
redis:
image: redis:7-alpine
container_name: hanzo-redis
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-hanzosecret}
volumes:
- redis_data:/data
networks:
- hanzo-network
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-hanzosecret}", "ping"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- with-router
volumes:
postgres_data:
redis_data: