# ============================================ # DeepTutor Docker Compose Configuration # ============================================ # This file provides orchestration for DeepTutor services # # Usage: # Production: python scripts/docker_compose.py up -d # Development: python scripts/docker_compose.py -f docker-compose.yml -f docker-compose.dev.yml up # Build only: python scripts/docker_compose.py build # # Prerequisites: # 1. Runtime settings are stored in ./data/user/settings (created automatically) # 2. Configure model providers from the web Settings page or model_catalog.json # 3. Use scripts/docker_compose.py so port mappings are rendered from system.json # # Local LLM (LM Studio / Ollama / vLLM): # Use "host.docker.internal" instead of "localhost" in provider base_url fields. # Configure provider endpoints in data/user/settings/model_catalog.json or the UI. # ============================================ services: # ============================================ # PocketBase — optional auth + storage sidecar # Set integrations.pocketbase_url=http://pocketbase:8090 to activate. # Leave integrations.pocketbase_url blank to run without PocketBase (SQLite fallback). # ============================================ pocketbase: image: ghcr.io/muchobien/pocketbase:latest container_name: pocketbase restart: unless-stopped ports: - "${DEEPTUTOR_DOCKER_POCKETBASE_PORT:-8090}:8090" volumes: - ./data/pocketbase:/pb/pb_data networks: - deeptutor-network healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8090/api/health"] interval: 10s timeout: 5s retries: 3 start_period: 10s # ============================================ # All-in-One DeepTutor Service # ============================================ deeptutor: build: context: . dockerfile: Dockerfile target: production container_name: deeptutor restart: unless-stopped ports: - "${DEEPTUTOR_DOCKER_BACKEND_PORT:-8001}:${DEEPTUTOR_DOCKER_BACKEND_PORT:-8001}" - "${DEEPTUTOR_DOCKER_FRONTEND_PORT:-3782}:${DEEPTUTOR_DOCKER_FRONTEND_PORT:-3782}" volumes: # Mount local data directory for persistence (read-write) # This includes runtime settings under ./data/user/settings. - ./data/user:/app/data/user - ./data/memory:/app/data/memory - ./data/knowledge_bases:/app/data/knowledge_bases healthcheck: test: ["CMD", "curl", "-f", "http://localhost:${DEEPTUTOR_DOCKER_BACKEND_PORT:-8001}/"] interval: 30s timeout: 10s retries: 3 start_period: 60s depends_on: pocketbase: condition: service_healthy networks: - deeptutor-network # ============================================ # Networks # ============================================ networks: deeptutor-network: driver: bridge