Files
portainer-core/stacks/core-api.yml
T
jpmschweitzerandClaude Opus 4.6 71cd913d05 fix(core-api): use IP address for Home Assistant URL
Container name resolution doesn't work for host-networked services.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 10:34:19 +01:00

102 lines
2.6 KiB
YAML

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://192.168.86.149: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