|
@@ -0,0 +1,156 @@
|
|
|
|
|
+version: "3.9"
|
|
|
|
|
+# Tailscale ühendus:
|
|
|
|
|
+# sudo tailscale serve --bg --https 3000 http://127.0.0.1:3000
|
|
|
|
|
+# sudo tailscale serve --https=3000 off
|
|
|
|
|
+# sudo tailscale serve status
|
|
|
|
|
+
|
|
|
|
|
+# ═══════════════════════════════════════════════════════════════
|
|
|
|
|
+# OPEN WEBUI - Professionaalne LLM liides
|
|
|
|
|
+# ═══════════════════════════════════════════════════════════════
|
|
|
|
|
+services:
|
|
|
|
|
+ open-webui:
|
|
|
|
|
+ image: ghcr.io/open-webui/open-webui:main
|
|
|
|
|
+ container_name: open-webui
|
|
|
|
|
+ restart: always
|
|
|
|
|
+ ports:
|
|
|
|
|
+ # Kui kasutad tailscale'i siis
|
|
|
|
|
+ #- "127.0.0.1:3000:8080"
|
|
|
|
|
+ - "100.87.1.24:3010:8080" # ainult tailnet; avalikult läbi prod (openwebui.odamus.com)
|
|
|
|
|
+ #env_file:
|
|
|
|
|
+ #- /data/docker/open-webui/.env
|
|
|
|
|
+ volumes:
|
|
|
|
|
+ - data:/app/backend/data
|
|
|
|
|
+ - /data/docker/open-webui/scripts:/scripts
|
|
|
|
|
+ #- /data/docker/open-webui/patches/searxng.py:/app/backend/open_webui/retrieval/web/searxng.py
|
|
|
|
|
+ - /backups/docker/open-webui:/backups
|
|
|
|
|
+ - /etc/localtime:/etc/localtime
|
|
|
|
|
+ #- /data/docker/open-webui/.env:/app/backend/open_webui/.env
|
|
|
|
|
+ #- /data/docker/open-webui/patches:/patches:ro
|
|
|
|
|
+ #entrypoint: ["/bin/sh", "-c", "python /patches/patch_ollama_embeddings.py; python /patches/patch_qdrant.py && exec /app/backend/start.sh"]
|
|
|
|
|
+ environment:
|
|
|
|
|
+ # --- PÕHISED ---
|
|
|
|
|
+ - WEBUI_SECRET_KEY=ai_webui_secret_2026_change_me_to_random_string
|
|
|
|
|
+ - TZ=Europe/Tallinn
|
|
|
|
|
+ - LANG=C.UTF-8
|
|
|
|
|
+ - CHAT_STREAM_RESPONSE_CHUNK_MAX_BUFFER_SIZE=52428800
|
|
|
|
|
+ - ENABLE_SIGNUP=false # esimesel korral true, hiljem false
|
|
|
|
|
+ - OPENAI_API_BASE_URLS=http://100.87.1.24:8070/v1
|
|
|
|
|
+ - OPENAI_API_KEYS=sk-dummy-key-not-required
|
|
|
|
|
+
|
|
|
|
|
+ - OLLAMA_API_BASE_URL=http://100.87.1.24:11434
|
|
|
|
|
+ - RAG_EMBEDDING_OPENAI_API_BASE_URL=http://100.87.1.24:11434
|
|
|
|
|
+
|
|
|
|
|
+ # --- RAG ja EMBEDDINGUD ---
|
|
|
|
|
+ - OLLAMA_BASE_URL=http://100.87.1.24:11434
|
|
|
|
|
+ - RAG_EMBEDDING_ENGINE=ollama
|
|
|
|
|
+ - RAG_EMBEDDING_MODEL=nomic-embed-text
|
|
|
|
|
+ - USE_OLLAMA_DOCKER=false
|
|
|
|
|
+ # Chunking (märgid, mitte sõnad)
|
|
|
|
|
+ #- RAG_TEXT_SPLITTER=recursive
|
|
|
|
|
+ #- RAG_CHUNK_SIZE=1000
|
|
|
|
|
+ #- RAG_CHUNK_OVERLAP=100
|
|
|
|
|
+ #- RAG_CHUNK_MIN_SIZE=100
|
|
|
|
|
+ # Hybrid search + reranker
|
|
|
|
|
+ #- RAG_HYBRID_SEARCH_ENABLED=true
|
|
|
|
|
+ #- RAG_TOP_K=20
|
|
|
|
|
+ # Full context režiim maha (kasuta fokuseeritud RAG-i)
|
|
|
|
|
+ - RAG_FULL_CONTEXT_MODE=false
|
|
|
|
|
+
|
|
|
|
|
+ # TEKSTI TÜKELDAMINE – need on kõige olulisemad suurte failide jaoks
|
|
|
|
|
+ - TEXT_SPLITTER=recursive
|
|
|
|
|
+ # kasuta rekursiivset tükeldajat (toetab keelepiire)
|
|
|
|
|
+ - CHUNK_SIZE=1500
|
|
|
|
|
+ # vähenda 500 tähemärgile, et vältida kontekstiületust
|
|
|
|
|
+ - CHUNK_OVERLAP=150
|
|
|
|
|
+ # kattuvus tükkide vahel
|
|
|
|
|
+ - CHUNK_MIN_SIZE_TARGET=300
|
|
|
|
|
+ # kui vaja, aga pole kohustuslik
|
|
|
|
|
+ - HYBRID_SEARCH_ENABLED=true
|
|
|
|
|
+ - TOP_K=20
|
|
|
|
|
+
|
|
|
|
|
+ - RAG_WEB_SEARCH_RESULT_COUNT=3
|
|
|
|
|
+ - WEB_LOADER_ENGINE=default
|
|
|
|
|
+ - CONCURRENT_REQUESTS=20 # kui pole juba
|
|
|
|
|
+
|
|
|
|
|
+ # Failide üleslaadimise piirangud
|
|
|
|
|
+ - UPLOAD_MAX_SIZE=6291456
|
|
|
|
|
+ # 6 MB baitides
|
|
|
|
|
+ - ALLOWED_FILE_EXTENSIONS=md,pdf,txt,docx
|
|
|
|
|
+ # luba ka markdown
|
|
|
|
|
+
|
|
|
|
|
+ # --- QDRANT --- (AINULT NEED!)
|
|
|
|
|
+ - VECTOR_DB=qdrant
|
|
|
|
|
+ - QDRANT_URI=http://qdrant:6333
|
|
|
|
|
+ #- VECTOR_DB=postgres
|
|
|
|
|
+ #- VECTOR_DB=weaviate
|
|
|
|
|
+ #- WEAVIATE_HOST=http://weaviate:8080
|
|
|
|
|
+
|
|
|
|
|
+ # --- SEARXNG (veebiotsing) ---
|
|
|
|
|
+ - ENABLE_RAG_WEB_SEARCH=true
|
|
|
|
|
+ - BYPASS_RETRIEVAL_ACCESS_CONTROL=true
|
|
|
|
|
+ - BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL=true
|
|
|
|
|
+ - RAG_WEB_SEARCH_ENGINE=searxng
|
|
|
|
|
+ - SEARXNG_QUERY_URL=http://100.87.1.24:8888/search?q=<query>&format=json&categories=general,news,science
|
|
|
|
|
+ #- SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>&format=json&categories=general,news,science
|
|
|
|
|
+ #- SEARXNG_QUERY_URL=http://localhost:8080/search?q=<query>&format=json&categories=general,news,science
|
|
|
|
|
+ - DATABASE_URL=postgresql://ai_user:ai_secure_pass_2026@postgres:5432/openwebui_test_db
|
|
|
|
|
+
|
|
|
|
|
+ # --- MCP TOOL SERVER ÜHENDUSED ---
|
|
|
|
|
+ - 'TOOL_SERVER_CONNECTIONS=[{"url":"http://mcp-filesystem-sse:3100/mcp","path":"","type":"mcp","auth_type":"none","key":"","headers":{},"config":{"enable":true,"access_grants":[]},"info":{"id":"filesystem","name":"Filesystem","description":"YOU CAN AND MUST USE THIS TOOL to create directories, write files, and read files on the server. Creates parent directories automatically. Use write_file to save code files. Allowed paths: /projects/data, /data, /scripts, /backups"}},{"url":"http://mcp-terminal:3110/mcp","path":"","type":"mcp","auth_type":"none","key":"","headers":{},"config":{"enable":true,"access_grants":[]},"info":{"id":"terminal","name":"Terminal","description":"YOU CAN AND MUST USE THIS TOOL to execute shell commands (mkdir, npm, npx, node, ng, python3, ls, cat). Also provides write_file and create_directory tools for saving files. This has WORKING WRITE ACCESS to /projects/data"}}]'
|
|
|
|
|
+ networks:
|
|
|
|
|
+ - ai_network
|
|
|
|
|
+ - prod_net
|
|
|
|
|
+ ulimits:
|
|
|
|
|
+ nofile:
|
|
|
|
|
+ soft: 65536
|
|
|
|
|
+ hard: 65536
|
|
|
|
|
+ extra_hosts:
|
|
|
|
|
+ - "host.docker.internal:host-gateway"
|
|
|
|
|
+ healthcheck:
|
|
|
|
|
+ test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
|
|
|
|
|
+ interval: 30s
|
|
|
|
|
+ timeout: 10s
|
|
|
|
|
+ retries: 3
|
|
|
|
|
+ start_period: 60s
|
|
|
|
|
+ mcp-terminal:
|
|
|
|
|
+ build: ./mcp-servers
|
|
|
|
|
+ container_name: mcp-terminal
|
|
|
|
|
+ entrypoint: ["/entrypoint-terminal.sh"]
|
|
|
|
|
+ restart: unless-stopped
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - "127.0.0.1:3110:3110"
|
|
|
|
|
+ environment:
|
|
|
|
|
+ - TZ=Europe/Tallinn
|
|
|
|
|
+ - LANG=C.UTF-8
|
|
|
|
|
+ volumes:
|
|
|
|
|
+ - /data/mcp-filesystem:/projects/data
|
|
|
|
|
+ - /etc/localtime:/etc/localtime
|
|
|
|
|
+ - /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
|
+ networks:
|
|
|
|
|
+ - ai_network
|
|
|
|
|
+
|
|
|
|
|
+ tika:
|
|
|
|
|
+ image: apache/tika:latest-full # "full" sisaldab Tesseract OCR-i (soovitatav)
|
|
|
|
|
+ container_name: tika
|
|
|
|
|
+ ports:
|
|
|
|
|
+ - "9998:9998" # Vajadusel väljapoole eksponeerimiseks
|
|
|
|
|
+ restart: unless-stopped
|
|
|
|
|
+ environment:
|
|
|
|
|
+ - TZ=Europe/Tallinn
|
|
|
|
|
+ - LANG=C.UTF-8
|
|
|
|
|
+ volumes:
|
|
|
|
|
+ - /etc/localtime:/etc/localtime
|
|
|
|
|
+ networks:
|
|
|
|
|
+ - ai_network
|
|
|
|
|
+
|
|
|
|
|
+volumes:
|
|
|
|
|
+ data:
|
|
|
|
|
+ name: 'open-webui_data'
|
|
|
|
|
+ driver: local
|
|
|
|
|
+
|
|
|
|
|
+networks:
|
|
|
|
|
+ ai_network:
|
|
|
|
|
+ external: true
|
|
|
|
|
+ name: main_ai_network
|
|
|
|
|
+ prod_net:
|
|
|
|
|
+ external: true
|