security rework and memory optimilizations.

This commit is contained in:
2025-11-17 08:48:00 +01:00
parent 72a653f494
commit e8eb2e954c
55 changed files with 8301 additions and 245 deletions
+19 -6
View File
@@ -3,7 +3,7 @@ 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: ai-dataplane (shared with Open WebUI, Ollama, Qdrant)
# Network: docker-dataplane (shared infrastructure network)
#
# Setup: Create venv before first deployment:
# cd /home/jpmschweitzer/Projects/portainer-core/services/core-api
@@ -17,7 +17,7 @@ services:
container_name: core-api
restart: unless-stopped
# Hot-reload development mode
# Production mode with workers
command: >
sh -c "
if [ ! -f /venv/bin/activate ]; then
@@ -29,8 +29,7 @@ services:
/venv/bin/uvicorn src.main:app
--host 0.0.0.0
--port 8083
--reload
--reload-dir /app/src
--workers 2
"
ports:
@@ -72,6 +71,11 @@ services:
- WEB_SCRAPER_DEFAULT_MAX_LENGTH=10000
- WEB_SCRAPER_MAX_LINKS_TO_EXTRACT=50
# Uptime Kuma Configuration
- KUMA_URL=http://uptime-kuma:3001
- KUMA_USERNAME=${KUMA_USERNAME}
- KUMA_PASSWORD=${KUMA_PASSWORD}
# Python path
- PYTHONPATH=/app
@@ -86,7 +90,15 @@ services:
- /home/jpmschweitzer/docker-data/core-api/logs:/app/logs
networks:
- ai-dataplane
- docker-dataplane
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
memory: 512M
labels:
- "com.centurylinklabs.watchtower.enable=true"
@@ -99,5 +111,6 @@ services:
start_period: 30s
networks:
ai-dataplane:
docker-dataplane:
external: true
name: docker-dataplane