services: backend: build: context: . dockerfile: backend/Dockerfile container_name: jarvis-backend restart: unless-stopped ports: - "8000:8000" env_file: - .env environment: - OPENROUTER_API_KEY=${OPENROUTER_API_KEY} - LLM_API_BASE=${LLM_API_BASE:-https://openrouter.ai/api/v1} - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN} - TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID} - LLM_MODEL=${LLM_MODEL:-ollama/llama3} - QDRANT_HOST=qdrant - OBSIDIAN_HOST=host.docker.internal - GRAPHRAG_API_URL=${GRAPHRAG_API_URL:-http://host.docker.internal:8088/api/v1/analytics/ask} - DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgres@db:5432/hermes} - HF_TOKEN=${HF_TOKEN} - HUGGING_FACE_HUB_TOKEN=${HUGGING_FACE_HUB_TOKEN} extra_hosts: - "host.docker.internal:host-gateway" volumes: - ./backend:/app/backend - ./hermes_sdk:/app/hermes_sdk - ./scripts:/app/scripts - ./.env:/app/.env - /var/run/docker.sock:/var/run/docker.sock - sandbox_data:/app/backend/data/sandbox depends_on: qdrant: condition: service_started db: condition: service_healthy healthcheck: test: ["CMD-SHELL", "python3 -c \"import urllib.request, urllib.error, sys; code=200; exec('try:\\n code=urllib.request.urlopen(\\\"http://localhost:8000/api/status\\\").getcode()\\nexcept urllib.error.HTTPError as e:\\n code=e.code\\nexcept Exception:\\n sys.exit(1)'); sys.exit(0 if code in (200, 401, 403) else 1)\""] interval: 5s timeout: 5s retries: 10 start_period: 45s networks: - hermes-net - sandbox-net frontend: build: context: ./frontend dockerfile: Dockerfile container_name: jarvis-dashboard restart: unless-stopped ports: - "9119:80" depends_on: backend: condition: service_healthy networks: - hermes-net db: image: postgres:16-alpine container_name: jarvis-db restart: unless-stopped ports: - "5432:5432" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=hermes volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d hermes"] interval: 5s timeout: 5s retries: 5 networks: - hermes-net qdrant: image: qdrant/qdrant:latest container_name: jarvis-qdrant restart: unless-stopped ports: - "6333:6333" - "6334:6334" volumes: - qdrant_data:/qdrant/storage networks: - hermes-net sandbox: build: context: ./sandbox container_name: jarvis-sandbox restart: unless-stopped deploy: resources: limits: cpus: '1.0' memory: 2G volumes: - sandbox_data:/mnt/data networks: - sandbox-net networks: hermes-net: driver: bridge sandbox-net: internal: true volumes: qdrant_data: postgres_data: sandbox_data: