version: '3.8' # Core API - OpenAPI-compatible functions and AI orchestration for Open WebUI # Purpose: Provides OpenAI-compatible API (/v1/chat/completions) and tool functions (web scraping) # Port: 8083 (HTTP API) # Network: docker-dataplane (shared infrastructure network) # # Container image built from: git.schweitz.internal/jpmschweitzer/core-api (internal registry) services: core-api: image: git.schweitz.internal/jpmschweitzer/core-api:latest container_name: core-api restart: unless-stopped ports: - "8083:8083" environment: # Application - APP_NAME=Core API - DEBUG=false - OIDC_ENABLED=true # Server - HOST=0.0.0.0 - PORT=8083 # Logging - LOG_LEVEL=INFO # Portainer API - PORTAINER_URL=http://192.168.86.149:8001 - PORTAINER_API_KEY=${PORTAINER_API_KEY} # Nginx Proxy Manager API - NPM_URL=http://192.168.86.149:81 - NPM_EMAIL=${NPM_EMAIL} - NPM_PASSWORD=${NPM_PASSWORD} # Postgres Shared Database API - POSTGRES_HOST=192.168.86.149:5432 - POSTGRES_USER=core_api - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # Authentik Configuration - AUTHENTIK_URL=https://auth.schweitz.net - AUTHENTIK_USERNAME=${AUTHENTIK_USERNAME} - AUTHENTIK_PASSWORD=${AUTHENTIK_PASSWORD} - AUTHENTIK_CORE_API_TOKEN=${AUTHENTIK_CORE_API_TOKEN} # HOME ASSITANT VARIABLES - HOMEASSISTANT_URL=http://home-assistant:8123 - HOMEASSISTANT_TOKEN=${HOMEASSISTANT_TOKEN} # AI SYSTEM VARIABLES - SEARXNG_URL=http://192.168.86.149:8080 - QDRANT_HOST=192.168.86.149 - QDRANT_PORT=6333 # Python path - PYTHONPATH=/app - PSUTIL_PROCFS_PATH=/host/proc - HOSTFS_ROOT=/hostfs volumes: # Data volumes only - no source code - /home/jpmschweitzer/docker-data/core-api/logs:/app/logs # Docker socket for direct container access (fallback when Portainer API incomplete) - /var/run/docker.sock:/var/run/docker.sock:ro - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/hostfs:ro deploy: resources: limits: cpus: '2.0' memory: 6G reservations: memory: 1G devices: - driver: nvidia count: all capabilities: [gpu] labels: - "com.centurylinklabs.watchtower.enable=true" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8083/health"] interval: 30s timeout: 20s retries: 3 start_period: 60s networks: docker-dataplane: external: true name: docker-dataplane