Compare commits
55 Commits
feat/honch
...
48c4c1b232
| Author | SHA1 | Date | |
|---|---|---|---|
| 48c4c1b232 | |||
| 53fcd59dff | |||
| 3f82c9d321 | |||
| a7e463dcd6 | |||
| 59fc28401e | |||
| f4dd57fa60 | |||
| a6b25ee84d | |||
| 8df60c2911 | |||
| a79f0610ec | |||
| be757bc683 | |||
| 3508ae2481 | |||
| eb5176949e | |||
| 5db33ddfd2 | |||
| 2d2787f404 | |||
| dab1ecfdd7 | |||
| e595381173 | |||
| 54e0661396 | |||
| 1e290410de | |||
| 80c9906757 | |||
| 2571930efa | |||
| e525145057 | |||
| e5f1d98bd9 | |||
| 82e3005d1f | |||
| d88db00f3f | |||
| cf1e316af1 | |||
| 0bff81bfa0 | |||
| 3c92d93366 | |||
| b185d43d67 | |||
| efaf3550b9 | |||
| 1460085718 | |||
| 6069ebd6a4 | |||
| 5dd6e9a442 | |||
| 54e3868f94 | |||
| 68009f05c1 | |||
| 87e546beae | |||
| b4a0e4449d | |||
| 9635ed8e7e | |||
| 2e8e0b4561 | |||
| 945d4e43a5 | |||
| 14eba26b6b | |||
| 6774af7c13 | |||
| c9a3386138 | |||
| 51018024e9 | |||
| c9b9f63a34 | |||
| 6641071d8f | |||
| 63b6cd3461 | |||
| 08778db685 | |||
| 8eb0344a08 | |||
| 59d529b64a | |||
| bb53161b50 | |||
| 352f9a9e78 | |||
| c85dbaf820 | |||
| 285351e82c | |||
| fcebd4f1cd | |||
| 231ce938de |
235
ai/compose.yml
235
ai/compose.yml
@@ -1,55 +1,26 @@
|
|||||||
version: "3.8"
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# webui:
|
|
||||||
# image: ghcr.io/open-webui/open-webui:main
|
|
||||||
# volumes:
|
|
||||||
# - /mnt/HoardingCow_docker_data/Ollama/open-webui:/app/backend/data
|
|
||||||
# restart: always
|
|
||||||
# environment:
|
|
||||||
# - OLLAMA_API_BASE_URL=http://ollama:11434/api
|
|
||||||
# networks:
|
|
||||||
# - ai_net
|
|
||||||
# - ai_backend
|
|
||||||
# labels:
|
|
||||||
# - "traefik.enable=true"
|
|
||||||
|
|
||||||
# # Router for HTTP + redirection to HTTPS
|
|
||||||
# - "traefik.http.routers.webui-http.rule=Host(`ai.lazyworkhorse.net`)"
|
|
||||||
# - "traefik.http.routers.webui-http.entrypoints=web"
|
|
||||||
# - "traefik.http.routers.webui-http.middlewares=redirect-to-https"
|
|
||||||
|
|
||||||
# # Router for HTTPS with TLS
|
|
||||||
# - "traefik.http.routers.webui-https.rule=Host(`ai.lazyworkhorse.net`)"
|
|
||||||
# - "traefik.http.routers.webui-https.entrypoints=websecure"
|
|
||||||
# - "traefik.http.routers.webui-https.tls=true"
|
|
||||||
# - "traefik.http.routers.webui-https.tls.certresolver=njalla"
|
|
||||||
|
|
||||||
hermes:
|
hermes:
|
||||||
build:
|
build:
|
||||||
context: ./hermes
|
context: ./hermes
|
||||||
ssh:
|
ssh:
|
||||||
- default
|
- default
|
||||||
container_name: hermes
|
container_name: hermes
|
||||||
entrypoint: ["/bin/bash", "-c",
|
|
||||||
"bash /opt/data/hermes-tools/install.sh && bash /usr/local/bin/run-multi-gateways.sh && exec /usr/bin/tini -g -- /opt/hermes/docker/entrypoint.sh \"$@\"",
|
|
||||||
"hermes-entrypoint"]
|
|
||||||
restart: always
|
restart: always
|
||||||
# Gateway run enables the internal API server on port 8642
|
# Gateway run enables the internal API server on port 8642
|
||||||
command: gateway run
|
command: gateway run
|
||||||
environment:
|
environment:
|
||||||
- OLLAMA_HOST=http://ollama:11434
|
- HERMES_UID=10000
|
||||||
|
- HERMES_GID=10000
|
||||||
|
- OLLAMA_HOST=http://ollama-cpu:11434
|
||||||
- HERMES_DASHBOARD=1
|
- HERMES_DASHBOARD=1
|
||||||
# Multi-profile: comma-separated list of profiles to run as gateways.
|
|
||||||
# The entrypoint reads this and starts one gateway per profile.
|
|
||||||
# Add profiles here when they exist on disk (e.g. default,researcher,writer)
|
|
||||||
- HERMES_PROFILES=ashley,claire,finn,matt,paul
|
|
||||||
- API_SERVER_ENABLED=true
|
- API_SERVER_ENABLED=true
|
||||||
- API_SERVER_PORT=8642
|
- API_SERVER_PORT=8642
|
||||||
- API_SERVER_HOST=0.0.0.0
|
- API_SERVER_HOST=0.0.0.0
|
||||||
- API_SERVER_KEY=hermes_local_key
|
- API_SERVER_KEY=hermes_local_key
|
||||||
- GATEWAY_ALLOW_ALL_USERS=true
|
- GATEWAY_ALLOW_ALL_USERS=true
|
||||||
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
||||||
|
- OPENCODE_API_KEY=${OPENCODE_API_KEY}
|
||||||
# ROCm for GPU-accelerated faster-whisper STT
|
# ROCm for GPU-accelerated faster-whisper STT
|
||||||
- HSA_OVERRIDE_GFX_VERSION=9.0.6
|
- HSA_OVERRIDE_GFX_VERSION=9.0.6
|
||||||
- HCC_AMDGPU_TARGET=gfx906
|
- HCC_AMDGPU_TARGET=gfx906
|
||||||
@@ -59,10 +30,7 @@ services:
|
|||||||
- TZ=America/Montreal
|
- TZ=America/Montreal
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/Hermes/data:/opt/data
|
- /mnt/HoardingCow_docker_data/Hermes/data:/opt/data
|
||||||
# Syncthing-shared org files — read-only view of user's agenda
|
- /mnt/HoardingCow_docker_data/Hermes/Syncthing/ExoKortex:/opt/data/ExoKortex
|
||||||
- /mnt/HoardingCow_docker_data/Syncthing/telos-ro:/opt/data/telos-ro:ro
|
|
||||||
# Syncthing-shared inbox — write tasks here, they sync to user's laptop
|
|
||||||
- /mnt/HoardingCow_docker_data/Syncthing/telos-rw:/opt/data/telos-rw:rw
|
|
||||||
devices:
|
devices:
|
||||||
- /dev/kfd:/dev/kfd
|
- /dev/kfd:/dev/kfd
|
||||||
- /dev/dri:/dev/dri
|
- /dev/dri:/dev/dri
|
||||||
@@ -109,31 +77,36 @@ services:
|
|||||||
- "21027:21027/udp"
|
- "21027:21027/udp"
|
||||||
environment:
|
environment:
|
||||||
- TZ=America/Montreal
|
- TZ=America/Montreal
|
||||||
|
- PUID=10000
|
||||||
|
- PGID=10000
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/Syncthing/config:/var/syncthing/config
|
- /mnt/HoardingCow_docker_data/Hermes/Syncthing/config:/var/syncthing/config
|
||||||
- /mnt/HoardingCow_docker_data/Syncthing/telos-ro:/telos-ro
|
- /mnt/HoardingCow_docker_data/Hermes/Syncthing/ExoKortex:/ExoKortex
|
||||||
- /mnt/HoardingCow_docker_data/Syncthing/telos-rw:/telos-rw
|
|
||||||
networks:
|
networks:
|
||||||
- ai_backend
|
- ai_backend
|
||||||
- ai_net
|
- ai_net
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=ai_net"
|
||||||
|
|
||||||
- "traefik.http.routers.syncthing-http.rule=Host(`syncthing.lazyworkhorse.net`)"
|
- "traefik.http.routers.syncthing-http.rule=Host(`syncthing.lazyworkhorse.net`)"
|
||||||
- "traefik.http.routers.syncthing-http.entrypoints=web"
|
- "traefik.http.routers.syncthing-http.entrypoints=web"
|
||||||
- "traefik.http.routers.syncthing-http.middlewares=redirect-to-https"
|
- "traefik.http.routers.syncthing-http.middlewares=redirect-to-https"
|
||||||
|
|
||||||
- "traefik.http.routers.syncthing-https.rule=Host(`syncthing.lazyworkhorse.net`)"
|
- "traefik.http.routers.syncthing-https.rule=Host(`syncthing.lazyworkhorse.net`)"
|
||||||
- "traefik.http.routers.syncthing-https.entrypoints=websecure"
|
- "traefik.http.routers.syncthing-https.entrypoints=websecure"
|
||||||
- "traefik.http.routers.syncthing-https.tls=true"
|
- "traefik.http.routers.syncthing-https.tls=true"
|
||||||
- "traefik.http.routers.syncthing-https.tls.certresolver=njalla"
|
- "traefik.http.routers.syncthing-https.tls.certresolver=njalla"
|
||||||
|
- "traefik.http.routers.syncthing-https.middlewares=hermes-auth"
|
||||||
|
|
||||||
- "traefik.http.services.syncthing.loadbalancer.server.port=8384"
|
- "traefik.http.services.syncthing.loadbalancer.server.port=8384"
|
||||||
|
|
||||||
|
ollama-cpu:
|
||||||
ollama:
|
|
||||||
build:
|
build:
|
||||||
context: ./ollama
|
context: ./ollama
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: ollama/ollama:rocm-gfx906
|
image: ollama/ollama:rocm-gfx906
|
||||||
container_name: ollama
|
container_name: ollama-cpu
|
||||||
tty: true
|
tty: true
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@@ -144,72 +117,87 @@ services:
|
|||||||
- /mnt/HoardingCow_docker_data/Ollama/ollama:/root/.ollama
|
- /mnt/HoardingCow_docker_data/Ollama/ollama:/root/.ollama
|
||||||
environment:
|
environment:
|
||||||
- OLLAMA_VULKAN=0
|
- OLLAMA_VULKAN=0
|
||||||
- HSA_OVERRIDE_GFX_VERSION=9.0.6
|
|
||||||
- HCC_AMDGPU_TARGET=gfx906
|
|
||||||
- HIP_VISIBLE_DEVICES=0,1
|
|
||||||
- ROCR_VISIBLE_DEVICES=0,1
|
|
||||||
- HSA_ENABLE_SDMA=0
|
|
||||||
- OLLAMA_HOST=0.0.0.0
|
- OLLAMA_HOST=0.0.0.0
|
||||||
- OLLAMA_DEBUG=1
|
|
||||||
- OLLAMA_FLASH_ATTENTION=1
|
llama-cpp-hermes:
|
||||||
- OLLAMA_NUM_PARALLEL=2
|
image: llama-cpp:rocm-gfx906
|
||||||
|
container_name: llama-cpp-hermes
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- ai_backend
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:8300:8080"
|
||||||
|
ipc: host
|
||||||
devices:
|
devices:
|
||||||
# Map the render nodes and KFD for ROCm to work inside the container
|
|
||||||
- /dev/kfd:/dev/kfd
|
- /dev/kfd:/dev/kfd
|
||||||
- /dev/dri:/dev/dri
|
- /dev/dri:/dev/dri
|
||||||
group_add:
|
group_add:
|
||||||
- "303"
|
- "303"
|
||||||
- "26"
|
- "26"
|
||||||
|
environment:
|
||||||
|
- HSA_OVERRIDE_GFX_VERSION=9.0.6
|
||||||
|
- HSA_ENABLE_SDMA=0
|
||||||
|
- HIP_VISIBLE_DEVICES=0,1
|
||||||
|
- LLAMA_CACHE=/models
|
||||||
|
volumes:
|
||||||
|
- /mnt/HoardingCow_docker_data/Llama_cpp/models:/models
|
||||||
|
- /mnt/HoardingCow_docker_data/Ollama/ollama/models/blobs/sha256-17823599694fa3503ef54bf748d5078c6ce881f4d01616cafa255dc05d215a08:/model.gguf:ro
|
||||||
|
command: >
|
||||||
|
-m /model.gguf
|
||||||
|
--host 0.0.0.0
|
||||||
|
--port 8080
|
||||||
|
--gpu-layers 99
|
||||||
|
--ctx-size 163840
|
||||||
|
-ctk f16 -ctv f16
|
||||||
|
--flash-attn on
|
||||||
|
--split-mode layer
|
||||||
|
--no-mmap
|
||||||
|
--n-predict -1
|
||||||
|
|
||||||
# --- Honcho: AI-native user modeling ---
|
# --- Honcho + OpenConcho combiné: API + Web UI nginx/FastAPI ---
|
||||||
honcho:
|
honcho:
|
||||||
build: ./honcho
|
build:
|
||||||
|
context: ./honcho
|
||||||
|
ssh:
|
||||||
|
- default
|
||||||
container_name: honcho
|
container_name: honcho
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "127.0.0.1:8001:8000"
|
|
||||||
environment:
|
environment:
|
||||||
- DB_CONNECTION_URI=postgresql+psycopg://honcho:honcho_pass@honcho-db:5432/honcho
|
- DB_CONNECTION_URI=postgresql+psycopg://honcho:honcho_pass@honcho-db:5432/honcho
|
||||||
- CACHE_URL=redis://honcho-redis:6379/0
|
- CACHE_URL=redis://honcho-redis:6379/0
|
||||||
- CACHE_ENABLED=true
|
- CACHE_ENABLED=true
|
||||||
- EMBEDDING_VECTOR_DIMENSIONS=1536
|
- EMBEDDING_VECTOR_DIMENSIONS=1024
|
||||||
- VECTOR_STORE_DIMENSIONS=
|
- AUTH_USE_AUTH=true
|
||||||
|
- AUTH_JWT_SECRET=${HONCHO_AUTH_JWT_SECRET}
|
||||||
|
# Needed by deriver/dream to make LLM calls (api_key_env = "HONCHO_OPENAI_API_KEY" in config.toml)
|
||||||
|
- HONCHO_OPENAI_API_KEY=${HONCHO_OPENAI_API_KEY}
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/Honcho/data:/app/data
|
- /mnt/HoardingCow_docker_data/Honcho/data:/app/data
|
||||||
networks:
|
- /mnt/HoardingCow_docker_data/Honcho/config.toml:/app/config.toml:ro
|
||||||
- ai_backend
|
|
||||||
- ai_net
|
|
||||||
depends_on:
|
|
||||||
honcho-db:
|
|
||||||
condition: service_healthy
|
|
||||||
honcho-redis:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
# --- OpenConcho: Honcho web UI ---
|
|
||||||
openconcho:
|
|
||||||
build: ./openconcho
|
|
||||||
container_name: openconcho
|
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
networks:
|
||||||
- ai_backend
|
- ai_backend
|
||||||
- ai_net
|
- ai_net
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=ai_net"
|
||||||
|
|
||||||
# Router for HTTP + redirect to HTTPS
|
# Router for HTTP + redirect to HTTPS
|
||||||
- "traefik.http.routers.openconcho-http.rule=Host(`honcho.lazyworkhorse.net`)"
|
- "traefik.http.routers.honcho-http.rule=Host(`honcho.lazyworkhorse.net`)"
|
||||||
- "traefik.http.routers.openconcho-http.entrypoints=web"
|
- "traefik.http.routers.honcho-http.entrypoints=web"
|
||||||
- "traefik.http.routers.openconcho-http.middlewares=redirect-to-https"
|
- "traefik.http.routers.honcho-http.middlewares=redirect-to-https"
|
||||||
|
|
||||||
# Router for HTTPS with TLS — protected by Authelia
|
# Router for HTTPS with TLS — protected by Authelia
|
||||||
- "traefik.http.routers.openconcho-https.rule=Host(`honcho.lazyworkhorse.net`)"
|
- "traefik.http.routers.honcho-https.rule=Host(`honcho.lazyworkhorse.net`)"
|
||||||
- "traefik.http.routers.openconcho-https.entrypoints=websecure"
|
- "traefik.http.routers.honcho-https.entrypoints=websecure"
|
||||||
- "traefik.http.routers.openconcho-https.tls=true"
|
- "traefik.http.routers.honcho-https.tls=true"
|
||||||
- "traefik.http.routers.openconcho-https.tls.certresolver=njalla"
|
- "traefik.http.routers.honcho-https.tls.certresolver=njalla"
|
||||||
- "traefik.http.routers.openconcho-https.middlewares=hermes-auth"
|
- "traefik.http.routers.honcho-https.middlewares=hermes-auth"
|
||||||
|
|
||||||
# Service Loadbalancer
|
# Service Loadbalancer (nginx port)
|
||||||
- "traefik.http.services.openconcho.loadbalancer.server.port=80"
|
- "traefik.http.services.honcho.loadbalancer.server.port=80"
|
||||||
|
depends_on:
|
||||||
|
- honcho-db
|
||||||
|
- honcho-redis
|
||||||
|
|
||||||
honcho-db:
|
honcho-db:
|
||||||
image: pgvector/pgvector:pg15
|
image: pgvector/pgvector:pg15
|
||||||
@@ -228,11 +216,6 @@ services:
|
|||||||
- ./honcho/init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
- ./honcho/init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||||
networks:
|
networks:
|
||||||
- ai_backend
|
- ai_backend
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U honcho -d honcho"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
|
|
||||||
honcho-redis:
|
honcho-redis:
|
||||||
image: redis:8
|
image: redis:8
|
||||||
@@ -244,62 +227,20 @@ services:
|
|||||||
- /mnt/HoardingCow_docker_data/Honcho/redis:/data
|
- /mnt/HoardingCow_docker_data/Honcho/redis:/data
|
||||||
networks:
|
networks:
|
||||||
- ai_backend
|
- ai_backend
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "redis-cli ping"]
|
|
||||||
interval: 5s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
ai_net:
|
ai_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: ai_net
|
name: ai_net
|
||||||
ai_backend:
|
ai_backend:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
name: ai_backend
|
name: ai_backend
|
||||||
|
|
||||||
# llama_cpp_devstral:
|
|
||||||
# image: ghcr.io/ggml-org/llama.cpp:server-rocm
|
|
||||||
# container_name: llama_cpp_devstral
|
|
||||||
# restart: unless-stopped
|
|
||||||
# networks:
|
|
||||||
# - ai_backend
|
|
||||||
# ports:
|
|
||||||
# - "8300:8080"
|
|
||||||
# ipc: host
|
|
||||||
# devices:
|
|
||||||
# - "/dev/kfd:/dev/kfd"
|
|
||||||
# - "/dev/dri:/dev/dri"
|
|
||||||
# group_add:
|
|
||||||
# - "303" # video
|
|
||||||
# - "26" # render
|
|
||||||
# environment:
|
|
||||||
# HSA_OVERRIDE_GFX_VERSION: 9.0.6
|
|
||||||
# HIP_VISIBLE_DEVICES: 0,1
|
|
||||||
# LLAMA_CACHE: /models
|
|
||||||
# volumes:
|
|
||||||
# - /mnt/HoardingCow_docker_data/Llama_cpp/models:/models
|
|
||||||
# - /mnt/HoardingCow_docker_data/Llama_cpp/devstral-agent.jinja:/template.jinja
|
|
||||||
# command: >
|
|
||||||
# -hf unsloth/Devstral-Small-2-24B-Instruct-2512-GGUF:Devstral-Small-2-24B-Instruct-2512-Q8_0.gguf
|
|
||||||
# -a devstral-2-small-llama_cpp
|
|
||||||
# --chat-template-file /template.jinja
|
|
||||||
# --host 0.0.0.0
|
|
||||||
# --port 8080
|
|
||||||
# --n-gpu-layers 99
|
|
||||||
# --ctx-size 163840
|
|
||||||
# --batch-size 4096
|
|
||||||
# --ubatch-size 4096
|
|
||||||
# --cache-type-k f16
|
|
||||||
# --cache-type-v f16
|
|
||||||
# --cache-reuse 256
|
|
||||||
# --flash-attn on
|
|
||||||
# --context-shift
|
|
||||||
# --split-mode layer
|
|
||||||
# --no-mmap
|
|
||||||
# --n-predict -1
|
|
||||||
# --parallel 2
|
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
honcho_data:
|
||||||
|
driver: bridge
|
||||||
|
name: honcho_data
|
||||||
|
|
||||||
# vllm:
|
# vllm:
|
||||||
# image: nalanzeyu/vllm-gfx906:v0.9.0-rocm6.3
|
# image: nalanzeyu/vllm-gfx906:v0.9.0-rocm6.3
|
||||||
# container_name: vllm
|
# container_name: vllm
|
||||||
@@ -346,6 +287,30 @@ networks:
|
|||||||
# - /mnt/HoardingCow_docker_data/vllm/models:/root/.cache/huggingface
|
# - /mnt/HoardingCow_docker_data/vllm/models:/root/.cache/huggingface
|
||||||
# restart: unless-stopped
|
# restart: unless-stopped
|
||||||
|
|
||||||
|
# webui:
|
||||||
|
# image: ghcr.io/open-webui/open-webui:main
|
||||||
|
# volumes:
|
||||||
|
# - /mnt/HoardingCow_docker_data/Ollama/open-webui:/app/backend/data
|
||||||
|
# restart: always
|
||||||
|
# environment:
|
||||||
|
# - OLLAMA_API_BASE_URL=http://ollama:11434/api
|
||||||
|
# networks:
|
||||||
|
# - ai_net
|
||||||
|
# - ai_backend
|
||||||
|
# labels:
|
||||||
|
# - "traefik.enable=true"
|
||||||
|
|
||||||
|
# # Router for HTTP + redirection to HTTPS
|
||||||
|
# - "traefik.http.routers.webui-http.rule=Host(`ai.lazyworkhorse.net`)"
|
||||||
|
# - "traefik.http.routers.webui-http.entrypoints=web"
|
||||||
|
# - "traefik.http.routers.webui-http.middlewares=redirect-to-https"
|
||||||
|
|
||||||
|
# # Router for HTTPS with TLS
|
||||||
|
# - "traefik.http.routers.webui-https.rule=Host(`ai.lazyworkhorse.net`)"
|
||||||
|
# - "traefik.http.routers.webui-https.entrypoints=websecure"
|
||||||
|
# - "traefik.http.routers.webui-https.tls=true"
|
||||||
|
# - "traefik.http.routers.webui-https.tls.certresolver=njalla"
|
||||||
|
|
||||||
# n8n:
|
# n8n:
|
||||||
# image: n8nio/n8n:latest
|
# image: n8nio/n8n:latest
|
||||||
# container_name: n8n
|
# container_name: n8n
|
||||||
|
|||||||
@@ -9,30 +9,11 @@
|
|||||||
# ---------- Base: official Hermes image (system deps, npm, uv, Playwright) ----------
|
# ---------- Base: official Hermes image (system deps, npm, uv, Playwright) ----------
|
||||||
FROM nousresearch/hermes-agent:latest
|
FROM nousresearch/hermes-agent:latest
|
||||||
|
|
||||||
# ---------- Overlay our forked source ----------
|
|
||||||
# Uses SSH agent forwarding from the build host (no key baked into image).
|
|
||||||
# --exclude node_modules/.venv keeps the base image's pre-built layers intact.
|
|
||||||
# Only the Python source, web UI source, and config change.
|
|
||||||
RUN --mount=type=ssh \
|
|
||||||
mkdir -p /root/.ssh && \
|
|
||||||
ssh-keyscan -p 2222 code.lazyworkhorse.net >> /root/.ssh/known_hosts 2>/dev/null && \
|
|
||||||
cd /tmp && \
|
|
||||||
GIT_SSH_COMMAND='ssh -p 2222 -o StrictHostKeyChecking=no' \
|
|
||||||
git clone --depth 1 --branch main \
|
|
||||||
git@code.lazyworkhorse.net:gortium/hermes-agent.git fork && \
|
|
||||||
rm -rf fork/node_modules fork/.venv fork/.git && \
|
|
||||||
cp -a fork/. /opt/hermes/ && \
|
|
||||||
rm -rf /tmp/fork /root/.ssh/
|
|
||||||
|
|
||||||
# ---------- Reinstall Python package (editable) ----------
|
|
||||||
# Picks up source changes from our fork.
|
|
||||||
RUN . /opt/hermes/.venv/bin/activate && \
|
|
||||||
uv pip install --no-cache-dir --no-deps -e /opt/hermes
|
|
||||||
|
|
||||||
# ---------- Extra system deps ----------
|
# ---------- Extra system deps ----------
|
||||||
USER root
|
USER root
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
|
gosu \
|
||||||
libportaudio2 ca-certificates poppler-utils imagemagick \
|
libportaudio2 ca-certificates poppler-utils imagemagick \
|
||||||
libolm-dev \
|
libolm-dev \
|
||||||
texlive-latex-base texlive-latex-extra texlive-fonts-recommended \
|
texlive-latex-base texlive-latex-extra texlive-fonts-recommended \
|
||||||
@@ -43,12 +24,6 @@ RUN apt-get update && \
|
|||||||
# ---------- UV ----------
|
# ---------- UV ----------
|
||||||
COPY --chmod=0755 --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/
|
COPY --chmod=0755 --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/
|
||||||
|
|
||||||
# ---------- Matrix bridge + extra pip deps ----------
|
|
||||||
# Previously installed inline at container startup and persisted via volume mount.
|
|
||||||
# Now baked into the image so the fragile venv volume mount can be removed.
|
|
||||||
RUN . /opt/hermes/.venv/bin/activate && \
|
|
||||||
uv pip install --no-cache-dir 'mautrix[encryption]' openai
|
|
||||||
|
|
||||||
WORKDIR /opt/hermes
|
WORKDIR /opt/hermes
|
||||||
|
|
||||||
# ---------- Matrix bridge + extra pip deps ----------
|
# ---------- Matrix bridge + extra pip deps ----------
|
||||||
@@ -84,10 +59,6 @@ os.remove(tgz)
|
|||||||
print('himalaya v1.2.0 installed')
|
print('himalaya v1.2.0 installed')
|
||||||
PYEOF
|
PYEOF
|
||||||
|
|
||||||
# ---------- Install multi-gateway launcher ----------
|
|
||||||
# Launches one gateway process per profile (HERMES_PROFILES env var)
|
|
||||||
COPY --chmod=0755 run-multi-gateways.sh /usr/local/bin/run-multi-gateways.sh
|
|
||||||
|
|
||||||
# ---------- Runtime ----------
|
# ---------- Runtime ----------
|
||||||
USER hermes
|
USER hermes
|
||||||
ENV HERMES_HOME=/opt/data
|
ENV HERMES_HOME=/opt/data
|
||||||
@@ -100,4 +71,9 @@ ENV CHROME_EXECUTABLE=/opt/hermes/.playwright/chromium/chrome-linux/chrome
|
|||||||
USER root
|
USER root
|
||||||
RUN chown -R hermes:hermes /opt/hermes/tools /opt/hermes/toolsets.py
|
RUN chown -R hermes:hermes /opt/hermes/tools /opt/hermes/toolsets.py
|
||||||
|
|
||||||
VOLUME [ "/opt/data" ]
|
VOLUME [ "/opt/data" ]
|
||||||
|
|
||||||
|
# Switch to the hermes user so the container runs unprivileged.
|
||||||
|
# All child processes inherit this user — no more orphan root processes
|
||||||
|
# that escape gosu privilege drops in the entrypoint.
|
||||||
|
USER hermes
|
||||||
|
|||||||
@@ -1,181 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Patch Hermes TTS tool: add Piper TTS provider, remove Edge TTS as default.
|
|
||||||
|
|
||||||
Patches ALL copies of tts_tool.py found (venv site-packages + /opt/hermes/tools/).
|
|
||||||
|
|
||||||
Searches multiple paths for tts_tool.py so it works both at build time
|
|
||||||
(in the image venv) and at runtime (on the mounted data volume).
|
|
||||||
|
|
||||||
Idempotent: if already patched, does nothing.
|
|
||||||
"""
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# Search for all copies of tts_tool.py
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
CANDIDATE_PATHS = [
|
|
||||||
"/opt/hermes/.venv/lib/python3.13/site-packages/tools/tts_tool.py",
|
|
||||||
"/opt/hermes/tools/tts_tool.py",
|
|
||||||
]
|
|
||||||
|
|
||||||
found_paths = []
|
|
||||||
|
|
||||||
for p in CANDIDATE_PATHS:
|
|
||||||
if os.path.exists(p):
|
|
||||||
found_paths.append(p)
|
|
||||||
print(f"Found tts_tool.py at: {p}")
|
|
||||||
|
|
||||||
# Also try to find via Python import
|
|
||||||
import subprocess
|
|
||||||
try:
|
|
||||||
result = subprocess.run(
|
|
||||||
[sys.executable, "-c", "import tools.tts_tool; print(tools.tts_tool.__file__)"],
|
|
||||||
capture_output=True, text=True, timeout=5
|
|
||||||
)
|
|
||||||
if result.returncode == 0:
|
|
||||||
p = result.stdout.strip()
|
|
||||||
if os.path.exists(p) and p not in found_paths:
|
|
||||||
found_paths.append(p)
|
|
||||||
print(f"Found tts_tool.py via import at: {p}")
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if not found_paths:
|
|
||||||
print("WARNING: tts_tool.py not found anywhere. Patching deferred to runtime.")
|
|
||||||
print(f"Searched: {CANDIDATE_PATHS}")
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# Old else block: the Edge TTS default fallback to replace
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
old_else = ''' else:
|
|
||||||
# Default: Edge TTS (free), with NeuTTS as local fallback
|
|
||||||
edge_available = True
|
|
||||||
try:
|
|
||||||
_import_edge_tts()
|
|
||||||
except ImportError:
|
|
||||||
edge_available = False
|
|
||||||
|
|
||||||
if edge_available:
|
|
||||||
logger.info("Generating speech with Edge TTS...")
|
|
||||||
try:
|
|
||||||
import concurrent.futures
|
|
||||||
with concurrent.futures.ThreadPoolExecutor(max_workers=1) as pool:
|
|
||||||
pool.submit(
|
|
||||||
lambda: asyncio.run(_generate_edge_tts(text, file_str, tts_config))
|
|
||||||
).result(timeout=60)
|
|
||||||
except RuntimeError:
|
|
||||||
asyncio.run(_generate_edge_tts(text, file_str, tts_config))
|
|
||||||
elif _check_neutts_available():
|
|
||||||
logger.info("Edge TTS not available, falling back to NeuTTS (local)...")
|
|
||||||
provider = "neutts"
|
|
||||||
_generate_neutts(text, file_str, tts_config)
|
|
||||||
else:
|
|
||||||
return json.dumps({
|
|
||||||
"success": False,
|
|
||||||
"error": "No TTS provider available. Install edge-tts (pip install edge-tts) "
|
|
||||||
"or set up NeuTTS for local synthesis."
|
|
||||||
}, ensure_ascii=False)'''
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# New block: elif provider == "piper" + else: fallback with Piper only
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
new_block = ''' elif provider == "piper":
|
|
||||||
# Piper TTS (local, CPU, no cloud, no Microsoft)
|
|
||||||
piper_binary = "/opt/hermes/.venv/bin/piper"
|
|
||||||
piper_config = tts_config.get("piper", {})
|
|
||||||
voice = piper_config.get("voice", "en_US-lessac-medium")
|
|
||||||
model_dir = piper_config.get("model_dir", "/opt/hermes/.venv/share/piper/voices")
|
|
||||||
model_path = os.path.join(model_dir, f"{voice}.onnx")
|
|
||||||
if not os.path.exists(model_path):
|
|
||||||
return json.dumps({
|
|
||||||
"success": False,
|
|
||||||
"error": "Piper TTS voice model not found. "
|
|
||||||
"Install Piper TTS and download a voice model."
|
|
||||||
}, ensure_ascii=False)
|
|
||||||
logger.info("Generating speech with Piper TTS (local, CPU)...")
|
|
||||||
import subprocess as _sp
|
|
||||||
cmd = [piper_binary, "--model", model_path, "--output-raw"]
|
|
||||||
try:
|
|
||||||
proc = _sp.Popen(cmd, stdin=_sp.PIPE, stdout=_sp.PIPE, stderr=_sp.PIPE)
|
|
||||||
raw_audio, stderr = proc.communicate(input=text.encode(), timeout=60)
|
|
||||||
if proc.returncode != 0:
|
|
||||||
raise RuntimeError(f"Piper TTS failed: {stderr.decode()[:200]}")
|
|
||||||
ffmpeg_cmd = ["ffmpeg", "-f", "s16le", "-ar", "22050", "-ac", "1", "-i", "-", "-y", file_str]
|
|
||||||
_sp.run(ffmpeg_cmd, input=raw_audio, capture_output=True, timeout=30)
|
|
||||||
except Exception as e:
|
|
||||||
return json.dumps({
|
|
||||||
"success": False,
|
|
||||||
"error": f"Piper TTS failed: {e}"
|
|
||||||
}, ensure_ascii=False)
|
|
||||||
|
|
||||||
else:
|
|
||||||
# Default: Piper TTS (local, CPU, no cloud, no Microsoft)
|
|
||||||
piper_binary = "/opt/hermes/.venv/bin/piper"
|
|
||||||
piper_config = tts_config.get("piper", {})
|
|
||||||
voice = piper_config.get("voice", "en_US-lessac-medium")
|
|
||||||
model_dir = piper_config.get("model_dir", "/opt/hermes/.venv/share/piper/voices")
|
|
||||||
model_path = os.path.join(model_dir, f"{voice}.onnx")
|
|
||||||
if os.path.exists(model_path) and os.path.exists(piper_binary):
|
|
||||||
logger.info("Generating speech with Piper TTS (local, CPU)...")
|
|
||||||
import subprocess as _sp
|
|
||||||
cmd = [piper_binary, "--model", model_path, "--output-raw"]
|
|
||||||
try:
|
|
||||||
proc = _sp.Popen(cmd, stdin=_sp.PIPE, stdout=_sp.PIPE, stderr=_sp.PIPE)
|
|
||||||
raw_audio, stderr = proc.communicate(input=text.encode(), timeout=60)
|
|
||||||
if proc.returncode != 0:
|
|
||||||
raise RuntimeError(stderr.decode()[:200])
|
|
||||||
ffmpeg_cmd = ["ffmpeg", "-f", "s16le", "-ar", "22050", "-ac", "1", "-i", "-", "-y", file_str]
|
|
||||||
_sp.run(ffmpeg_cmd, input=raw_audio, capture_output=True, timeout=30)
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return json.dumps({
|
|
||||||
"success": False,
|
|
||||||
"error": "Piper TTS not available. Install piper-tts and download a voice model."
|
|
||||||
}, ensure_ascii=False)'''
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
# Apply the patch to all copies found
|
|
||||||
# ---------------------------------------------------------------------------
|
|
||||||
patched_any = False
|
|
||||||
|
|
||||||
for tts_path in found_paths:
|
|
||||||
with open(tts_path) as f:
|
|
||||||
code = f.read()
|
|
||||||
|
|
||||||
if 'provider == "piper"' in code:
|
|
||||||
print(f"ALREADY PATCHED: {tts_path}")
|
|
||||||
continue
|
|
||||||
|
|
||||||
if old_else in code:
|
|
||||||
code = code.replace(old_else, new_block, 1)
|
|
||||||
with open(tts_path, 'w') as f:
|
|
||||||
f.write(code)
|
|
||||||
print(f"PATCHED: {tts_path}")
|
|
||||||
patched_any = True
|
|
||||||
else:
|
|
||||||
print(f"SKIP {tts_path}: Edge fallback pattern not found")
|
|
||||||
import re
|
|
||||||
for m in re.finditer(r' else:\n # Default:', code):
|
|
||||||
start = max(0, m.start() - 100)
|
|
||||||
end = min(len(code), m.end() + 300)
|
|
||||||
print(f" Found 'else:/# Default:' at position {m.start()}:")
|
|
||||||
print(f" {code[start:end]}")
|
|
||||||
print(" ---")
|
|
||||||
# Don't exit with error — if one copy isn't patchable, try the others
|
|
||||||
|
|
||||||
if not patched_any:
|
|
||||||
all_patched = all(
|
|
||||||
'provider == "piper"' in open(p).read()
|
|
||||||
for p in found_paths
|
|
||||||
)
|
|
||||||
if all_patched:
|
|
||||||
print("All copies already patched.")
|
|
||||||
sys.exit(0)
|
|
||||||
print("WARNING: Could not patch any copy of tts_tool.py")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
print("tts_tool.py patched successfully across all copies.")
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Multi-gateway launcher for HERMES_PROFILES env var.
|
|
||||||
# Reads comma-separated profile names, spawns one gateway per profile.
|
|
||||||
# Designed to run before the main entrypoint — gateways run in background.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -z "${HERMES_PROFILES}" ]; then
|
|
||||||
echo "HERMES_PROFILES not set — skipping multi-gateway launch"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Source venv to make 'hermes' available (entrypoint.sh sources it later,
|
|
||||||
# but we need it NOW for the background gateways)
|
|
||||||
HERMES_BIN="/opt/hermes/.venv/bin/hermes"
|
|
||||||
if [ ! -x "$HERMES_BIN" ]; then
|
|
||||||
echo "ERROR: hermes binary not found at $HERMES_BIN"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /opt/data/logs
|
|
||||||
|
|
||||||
IFS=',' read -ra PROFILES <<< "${HERMES_PROFILES}"
|
|
||||||
for profile in "${PROFILES[@]}"; do
|
|
||||||
profile="$(echo "${profile}" | xargs)" # trim whitespace
|
|
||||||
[ -z "${profile}" ] && continue
|
|
||||||
|
|
||||||
echo "Starting gateway for profile: ${profile}"
|
|
||||||
nohup env API_SERVER_ENABLED=false API_SERVER_KEY= gosu hermes "$HERMES_BIN" --profile "${profile}" gateway run \
|
|
||||||
>> "/opt/data/logs/gateway-${profile}.log" 2>&1 &
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All gateways launched: ${HERMES_PROFILES}"
|
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
# build stage — fetches and builds Honcho from source
|
# build stage — fetches and builds Honcho from source
|
||||||
# Using buildkit cache mounts for speed across rebuilds
|
FROM python:3.13-slim-bookworm AS honcho-builder
|
||||||
FROM python:3.13-slim-bookworm AS builder
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends git && \
|
apt-get install -y --no-install-recommends git openssh-client && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:0.9.24 /uv /bin/uv
|
COPY --from=ghcr.io/astral-sh/uv:0.9.24 /uv /bin/uv
|
||||||
|
|
||||||
# Clone Honcho at a pinned commit for reproducibility
|
ARG HONCHO_REPO=ssh://git@code.lazyworkhorse.net:2222/Hermes/honcho.git
|
||||||
ARG HONCHO_REPO=https://github.com/plastic-labs/honcho
|
|
||||||
ARG HONCHO_REF=main
|
ARG HONCHO_REF=main
|
||||||
RUN git clone --depth 1 --branch ${HONCHO_REF} ${HONCHO_REPO} /app
|
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan -p 2222 code.lazyworkhorse.net >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
RUN --mount=type=ssh git clone --depth 1 --branch ${HONCHO_REF} ${HONCHO_REPO} /app
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -21,21 +20,57 @@ ENV UV_PYTHON=/usr/local/bin/python3.13
|
|||||||
|
|
||||||
RUN uv sync --frozen
|
RUN uv sync --frozen
|
||||||
|
|
||||||
# --- runtime stage ---
|
# build stage — builds OpenConcho SPA
|
||||||
|
FROM node:22-bookworm AS openconcho-builder
|
||||||
|
|
||||||
|
ENV PNPM_HOME=/pnpm
|
||||||
|
ENV PATH=$PNPM_HOME:$PATH
|
||||||
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN apt-get update && apt-get install -y git openssh-client && rm -rf /var/lib/apt/lists/**
|
||||||
|
|
||||||
|
ARG OPENCONCHO_SHA=148766312e6a5256f399c64171854f0ff6173b6d
|
||||||
|
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan -p 2222 code.lazyworkhorse.net >> ~/.ssh/known_hosts 2>/dev/null
|
||||||
|
RUN --mount=type=ssh git clone --depth 1 ssh://git@code.lazyworkhorse.net:2222/gortium/openconcho.git /app && \
|
||||||
|
git -C /app fetch --depth 1 origin ${OPENCONCHO_SHA} && \
|
||||||
|
git -C /app checkout ${OPENCONCHO_SHA}
|
||||||
|
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
RUN pnpm --filter @openconcho/web build
|
||||||
|
|
||||||
|
# runtime stage — nginx + Honcho FastAPI
|
||||||
FROM python:3.13-slim-bookworm
|
FROM python:3.13-slim-bookworm
|
||||||
|
|
||||||
RUN groupadd --system app && \
|
# Install nginx and create runtime dirs before dropping permissions
|
||||||
useradd --system --gid app --create-home app
|
RUN apt-get update && apt-get install -y --no-install-recommends nginx && \
|
||||||
|
rm -rf /var/log/nginx/* && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -f /etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
COPY --from=builder /app /app
|
# Patch nginx.conf: comment out "user www-data;" so nginx master stays as root
|
||||||
|
# (workers inherit root inside a container — fine for single-service isolation)
|
||||||
|
RUN sed -i 's/^user /# user /' /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
# Pre-create nginx runtime directories with proper ownership
|
||||||
|
RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy /var/lib/nginx/fastcgi \
|
||||||
|
/var/lib/nginx/uwsgi /var/lib/nginx/scgi /var/lib/nginx/proxy_temp \
|
||||||
|
/var/cache/nginx && \
|
||||||
|
chown -R root:root /var/lib/nginx /var/cache/nginx
|
||||||
|
|
||||||
|
# Honcho
|
||||||
|
COPY --from=honcho-builder /app /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV PATH="/app/.venv/bin:$PATH"
|
ENV PATH="/app/.venv/bin:$PATH"
|
||||||
ENV HOME=/app
|
ENV HOME=/app
|
||||||
|
COPY config.toml /app/config.toml
|
||||||
|
|
||||||
COPY --chown=app:app config.toml /app/config.toml
|
# OpenConcho SPA
|
||||||
|
COPY --from=openconcho-builder /app/packages/web/dist /usr/share/nginx/html
|
||||||
|
|
||||||
USER app
|
# nginx config (proxies /v3/, /v2/ to Honcho on localhost:8000)
|
||||||
EXPOSE 8000
|
COPY honcho-nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
CMD ["fastapi", "run", "--host", "0.0.0.0", "src/main.py"]
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["bash", "-c", "nginx -g 'daemon off;' & fastapi run --host 127.0.0.1 --port 8000 src/main.py & python3 -m src.deriver & wait -n"]
|
||||||
|
|||||||
@@ -29,17 +29,17 @@ URL = "redis://honcho-redis:6379/0"
|
|||||||
[llm]
|
[llm]
|
||||||
DEFAULT_MAX_TOKENS = 4096
|
DEFAULT_MAX_TOKENS = 4096
|
||||||
|
|
||||||
# Embeddings via Ollama (nomic-embed-text recommended on this system)
|
# Embeddings via Ollama — bge-m3 provides 1024-dim
|
||||||
[embedding]
|
[embedding]
|
||||||
VECTOR_DIMENSIONS = 768
|
VECTOR_DIMENSIONS = 1024
|
||||||
MAX_INPUT_TOKENS = 8192
|
MAX_INPUT_TOKENS = 8192
|
||||||
|
|
||||||
[embedding.model_config]
|
[embedding.model_config]
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "nomic-embed-text"
|
model = "bge-m3"
|
||||||
base_url = "http://ollama:11434/v1"
|
overrides = {base_url = "http://ollama:11434/v1", api_key = "ollama"}
|
||||||
|
|
||||||
# --- Deriver (user representation builder) ---
|
# --- Deriver ---
|
||||||
[deriver]
|
[deriver]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
WORKERS = 1
|
WORKERS = 1
|
||||||
@@ -47,9 +47,9 @@ POLLING_SLEEP_INTERVAL_SECONDS = 5.0
|
|||||||
FLUSH_ENABLED = true
|
FLUSH_ENABLED = true
|
||||||
|
|
||||||
[deriver.model_config]
|
[deriver.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
# --- Dialectic ---
|
# --- Dialectic ---
|
||||||
[dialectic]
|
[dialectic]
|
||||||
@@ -60,37 +60,37 @@ SESSION_HISTORY_MAX_TOKENS = 8192
|
|||||||
MAX_TOOL_ITERATIONS = 1
|
MAX_TOOL_ITERATIONS = 1
|
||||||
MAX_OUTPUT_TOKENS = 512
|
MAX_OUTPUT_TOKENS = 512
|
||||||
[dialectic.levels.minimal.model_config]
|
[dialectic.levels.minimal.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
[dialectic.levels.low]
|
[dialectic.levels.low]
|
||||||
MAX_TOOL_ITERATIONS = 3
|
MAX_TOOL_ITERATIONS = 3
|
||||||
[dialectic.levels.low.model_config]
|
[dialectic.levels.low.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
[dialectic.levels.medium]
|
[dialectic.levels.medium]
|
||||||
MAX_TOOL_ITERATIONS = 2
|
MAX_TOOL_ITERATIONS = 2
|
||||||
[dialectic.levels.medium.model_config]
|
[dialectic.levels.medium.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
[dialectic.levels.high]
|
[dialectic.levels.high]
|
||||||
MAX_TOOL_ITERATIONS = 4
|
MAX_TOOL_ITERATIONS = 4
|
||||||
[dialectic.levels.high.model_config]
|
[dialectic.levels.high.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
[dialectic.levels.max]
|
[dialectic.levels.max]
|
||||||
MAX_TOOL_ITERATIONS = 10
|
MAX_TOOL_ITERATIONS = 10
|
||||||
[dialectic.levels.max.model_config]
|
[dialectic.levels.max.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
# --- Summary ---
|
# --- Summary ---
|
||||||
[summary]
|
[summary]
|
||||||
@@ -99,13 +99,28 @@ MESSAGES_PER_SHORT_SUMMARY = 20
|
|||||||
MESSAGES_PER_LONG_SUMMARY = 60
|
MESSAGES_PER_LONG_SUMMARY = 60
|
||||||
|
|
||||||
[summary.model_config]
|
[summary.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
transport = "openai"
|
transport = "openai"
|
||||||
model = "hermes-3"
|
model = "deepseek-v4-flash"
|
||||||
base_url = "http://ollama:11434/v1"
|
|
||||||
|
|
||||||
# --- Dream ---
|
# --- Dream ---
|
||||||
[dream]
|
[dream]
|
||||||
ENABLED = false
|
ENABLED = true
|
||||||
|
|
||||||
|
[dream.model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
|
transport = "openai"
|
||||||
|
model = "deepseek-v4-flash"
|
||||||
|
|
||||||
|
[dream.deduction_model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
|
transport = "openai"
|
||||||
|
model = "deepseek-v4-flash"
|
||||||
|
|
||||||
|
[dream.induction_model_config]
|
||||||
|
overrides = {base_url = "https://opencode.ai/zen/go/v1", api_key_env = "HONCHO_OPENAI_API_KEY"}
|
||||||
|
transport = "openai"
|
||||||
|
model = "deepseek-v4-flash"
|
||||||
|
|
||||||
# --- Peer Card ---
|
# --- Peer Card ---
|
||||||
[peer_card]
|
[peer_card]
|
||||||
@@ -114,4 +129,4 @@ ENABLED = true
|
|||||||
# --- Vector Store ---
|
# --- Vector Store ---
|
||||||
[vector_store]
|
[vector_store]
|
||||||
TYPE = "pgvector"
|
TYPE = "pgvector"
|
||||||
DIMENSIONS = 768
|
# DIMENSIONS is deprecated — EMBEDDING.VECTOR_DIMENSIONS is authoritative
|
||||||
|
|||||||
52
ai/honcho/honcho-nginx.conf
Normal file
52
ai/honcho/honcho-nginx.conf
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# Honcho API proxy
|
||||||
|
location /v3/ {
|
||||||
|
proxy_pass http://127.0.0.1:8000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /v2/ {
|
||||||
|
proxy_pass http://127.0.0.1:8000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Honcho health
|
||||||
|
location /health {
|
||||||
|
proxy_pass http://127.0.0.1:8000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
# OpenAPI docs
|
||||||
|
location /openapi.json {
|
||||||
|
proxy_pass http://127.0.0.1:8000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
# SPA: fallback to index.html for client-side routing
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
32
ai/llama-cpp/Dockerfile
Normal file
32
ai/llama-cpp/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# llama-cpp-rocm6/Dockerfile
|
||||||
|
# Custom llama.cpp server with ROCm 6.1 + gfx906 (MI50) support.
|
||||||
|
# Build: docker build -t llama-cpp:rocm-gfx906 .
|
||||||
|
# NOTE: Update LLAMACPP_VERSION for bugfixes, but verify ROCm 6.1 compat
|
||||||
|
# by checking if recent releases still support -DGGML_HIP=ON.
|
||||||
|
|
||||||
|
FROM rocm/dev-ubuntu-22.04:6.1.2-complete AS builder
|
||||||
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl git build-essential pkg-config cmake make && rm -rf /var/lib/apt/lists/*
|
||||||
|
ARG LLAMACPP_VERSION=b9890
|
||||||
|
RUN git clone --depth 1 --branch ${LLAMACPP_VERSION} https://github.com/ggml-org/llama.cpp.git /build
|
||||||
|
WORKDIR /build
|
||||||
|
ENV HIP_PATH=/opt/rocm ROCM_PATH=/opt/rocm PATH=/opt/rocm/bin:/opt/rocm/llvm/bin:${PATH} CMAKE_PREFIX_PATH=/opt/rocm
|
||||||
|
RUN mkdir build && cd build && \
|
||||||
|
cmake .. -DGGML_HIP=ON -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DAMDGPU_TARGETS="gfx906:xnack-" \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DGGML_CUDA=OFF -DGGML_VULKAN=OFF -DGGML_METAL=OFF \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF && \
|
||||||
|
cmake --build . --target llama-server -- -j $(nproc)
|
||||||
|
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
ca-certificates curl libstdc++6 libgomp1 libopenblas0 \
|
||||||
|
libnuma1 libelf1 libdrm2 libdrm-amdgpu1 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
COPY --from=builder /opt/rocm/lib/ /opt/rocm/lib/
|
||||||
|
COPY --from=builder /opt/rocm/share/ /opt/rocm/share/
|
||||||
|
COPY --from=builder /build/build/bin/llama-server /usr/local/bin/llama-server
|
||||||
|
RUN echo /opt/rocm/lib > /etc/ld.so.conf.d/rocm.conf && ldconfig
|
||||||
|
ENV HSA_OVERRIDE_GFX_VERSION=9.0.6 HCC_AMDGPU_TARGET=gfx906 HSA_ENABLE_SDMA=0
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["/usr/local/bin/llama-server"]
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# build stage
|
|
||||||
FROM node:22-bookworm AS builder
|
|
||||||
|
|
||||||
ENV PNPM_HOME=/pnpm
|
|
||||||
ENV PATH=$PNPM_HOME:$PATH
|
|
||||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
ARG OPENCONCHO_SHA=e490d911fcb27ee193558fd9a28856cde2057665
|
|
||||||
RUN git clone --depth 1 https://github.com/offendingcommit/openconcho.git /app && \
|
|
||||||
git -C /app fetch --depth 1 origin ${OPENCONCHO_SHA} && \
|
|
||||||
git -C /app checkout ${OPENCONCHO_SHA}
|
|
||||||
|
|
||||||
RUN pnpm install --frozen-lockfile
|
|
||||||
RUN pnpm --filter @openconcho/web build
|
|
||||||
|
|
||||||
# runtime stage
|
|
||||||
FROM nginx:alpine
|
|
||||||
COPY --from=builder /app/packages/web/dist /usr/share/nginx/html
|
|
||||||
EXPOSE 80
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
||||||
@@ -32,5 +32,5 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
auth_net:
|
auth_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: auth_net
|
name: auth_net
|
||||||
|
|||||||
@@ -68,33 +68,33 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
- "traefik.enable=false" # Internal only, accessed by restic-browser
|
- "traefik.enable=false" # Internal only, accessed by restic-browser
|
||||||
|
|
||||||
restic-browser:
|
# restic-browser:
|
||||||
image: embergarage/restic-browser:latest
|
# image: mazzolino/restic-browser:latest
|
||||||
container_name: restic-browser
|
# container_name: restic-browser
|
||||||
restart: always
|
# restart: always
|
||||||
environment:
|
# environment:
|
||||||
- TZ=America/Montreal
|
# - TZ=America/Montreal
|
||||||
- RESTIC_REPOSITORY=http://restic-server:8080
|
# - RESTIC_REPOSITORY=http://restic-server:8080
|
||||||
- RESTIC_PASSWORD=${RESTIC_PASSWORD}
|
# - RESTIC_PASSWORD=${RESTIC_PASSWORD}
|
||||||
networks:
|
# networks:
|
||||||
- backup_net
|
# - backup_net
|
||||||
labels:
|
# labels:
|
||||||
- "traefik.enable=true"
|
# - "traefik.enable=true"
|
||||||
# 1. HTTP to HTTPS Redirect
|
# # 1. HTTP to HTTPS Redirect
|
||||||
- "traefik.http.routers.restic-browser-http.rule=Host(`backup.lazyworkhorse.net`)"
|
# - "traefik.http.routers.restic-browser-http.rule=Host(`backup.lazyworkhorse.net`)"
|
||||||
- "traefik.http.routers.restic-browser-http.entrypoints=web"
|
# - "traefik.http.routers.restic-browser-http.entrypoints=web"
|
||||||
- "traefik.http.routers.restic-browser-http.middlewares=redirect-to-https@docker"
|
# - "traefik.http.routers.restic-browser-http.middlewares=redirect-to-https@docker"
|
||||||
|
#
|
||||||
# 2. HTTPS Configuration
|
# # 2. HTTPS Configuration
|
||||||
- "traefik.http.routers.restic-browser.rule=Host(`backup.lazyworkhorse.net`)"
|
# - "traefik.http.routers.restic-browser.rule=Host(`backup.lazyworkhorse.net`)"
|
||||||
- "traefik.http.routers.restic-browser.entrypoints=websecure"
|
# - "traefik.http.routers.restic-browser.entrypoints=websecure"
|
||||||
- "traefik.http.routers.restic-browser.tls=true"
|
# - "traefik.http.routers.restic-browser.tls=true"
|
||||||
- "traefik.http.routers.restic-browser.tls.certresolver=njalla"
|
# - "traefik.http.routers.restic-browser.tls.certresolver=njalla"
|
||||||
|
#
|
||||||
# 3. Backend Service Config
|
# # 3. Backend Service Config
|
||||||
- "traefik.http.services.restic-browser.loadbalancer.server.port=8000"
|
# - "traefik.http.services.restic-browser.loadbalancer.server.port=8000"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
backup_net:
|
backup_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: backup_net
|
name: backup_net
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- cloud_net
|
- cloud_net
|
||||||
|
- cloud_internal
|
||||||
environment:
|
environment:
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
@@ -51,7 +52,7 @@ services:
|
|||||||
container_name: nextcloud_cron
|
container_name: nextcloud_cron
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- cloud_net
|
- cloud_internal
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/NextCloud/data:/var/www/html:rw
|
- /mnt/HoardingCow_docker_data/NextCloud/data:/var/www/html:rw
|
||||||
@@ -75,7 +76,7 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
cloud_net:
|
cloud_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: cloud_net
|
name: cloud_net
|
||||||
cloud_internal:
|
cloud_internal:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
coms_net:
|
coms_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: coms_net
|
name: coms_net
|
||||||
coms_backend:
|
coms_backend:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
@@ -37,4 +37,5 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
finance_net:
|
finance_net:
|
||||||
external: true
|
driver: bridge
|
||||||
|
name: finance_net
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/Home_Assistant:/config:rw
|
- /mnt/HoardingCow_docker_data/Home_Assistant:/config:rw
|
||||||
networks:
|
networks:
|
||||||
- home_auto_net
|
- home_net
|
||||||
- home_auto_backend
|
- home_backend
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/Mosquitto:/mosquitto
|
- /mnt/HoardingCow_docker_data/Mosquitto:/mosquitto
|
||||||
networks:
|
networks:
|
||||||
- home_auto_backend
|
- home_backend
|
||||||
# ports:
|
# ports:
|
||||||
# - 1883:1883
|
# - 1883:1883
|
||||||
# - 9001:9001
|
# - 9001:9001
|
||||||
@@ -43,7 +43,7 @@ services:
|
|||||||
image: registry.gitlab.com/hydroqc/hydroqc2mqtt:1.3.0
|
image: registry.gitlab.com/hydroqc/hydroqc2mqtt:1.3.0
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- home_auto_backend
|
- home_backend
|
||||||
environment:
|
environment:
|
||||||
MQTT_USERNAME: hass
|
MQTT_USERNAME: hass
|
||||||
MQTT_PASSWORD: ${MQTT_PASSWORD}
|
MQTT_PASSWORD: ${MQTT_PASSWORD}
|
||||||
@@ -88,8 +88,9 @@ services:
|
|||||||
# restart: unless-stopped
|
# restart: unless-stopped
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
home_auto_net:
|
home_net:
|
||||||
external: true
|
|
||||||
home_auto_backend:
|
|
||||||
driver: bridge
|
driver: bridge
|
||||||
name: home_auto_backend
|
name: home_net
|
||||||
|
home_backend:
|
||||||
|
driver: bridge
|
||||||
|
name: home_backend
|
||||||
|
|||||||
@@ -38,4 +38,5 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
homepage_net:
|
homepage_net:
|
||||||
external: true
|
driver: bridge
|
||||||
|
name: homepage_net
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ services:
|
|||||||
- cloud_net
|
- cloud_net
|
||||||
- coms_net
|
- coms_net
|
||||||
- finance_net
|
- finance_net
|
||||||
- home_auto_net
|
- home_net
|
||||||
- homepage_net
|
- homepage_net
|
||||||
- passman_net
|
- pass_net
|
||||||
- tak_net
|
- tak_net
|
||||||
- vc_net
|
- vc_net
|
||||||
|
|
||||||
@@ -82,37 +82,37 @@ networks:
|
|||||||
driver: bridge
|
driver: bridge
|
||||||
name: traefik_backend
|
name: traefik_backend
|
||||||
ai_net:
|
ai_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: ai_net
|
name: ai_net
|
||||||
auth_net:
|
auth_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: auth_net
|
name: auth_net
|
||||||
backup_net:
|
backup_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: backup_net
|
name: backup_net
|
||||||
cloud_net:
|
cloud_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: cloud_net
|
name: cloud_net
|
||||||
coms_net:
|
coms_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: coms_net
|
name: coms_net
|
||||||
finance_net:
|
finance_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: finance_net
|
name: finance_net
|
||||||
home_auto_net:
|
home_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: home_auto_net
|
name: home_net
|
||||||
homepage_net:
|
homepage_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: homepage_net
|
name: homepage_net
|
||||||
passman_net:
|
pass_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: passman_net
|
name: pass_net
|
||||||
tak_net:
|
tak_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: tak_net
|
name: tak_net
|
||||||
vc_net:
|
vc_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: vc_net
|
name: vc_net
|
||||||
|
|
||||||
# duckdns:
|
# duckdns:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/BitWarden/data:/data:rw
|
- /mnt/HoardingCow_docker_data/BitWarden/data:/data:rw
|
||||||
networks:
|
networks:
|
||||||
- passman_net
|
- pass_net
|
||||||
restart: always
|
restart: always
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
@@ -32,5 +32,6 @@ services:
|
|||||||
# Internal service
|
# Internal service
|
||||||
- "traefik.http.services.pass.loadbalancer.server.port=80"
|
- "traefik.http.services.pass.loadbalancer.server.port=80"
|
||||||
networks:
|
networks:
|
||||||
passman_net:
|
pass_net:
|
||||||
external: true
|
driver: bridge
|
||||||
|
name: pass_net
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
tak_net:
|
tak_net:
|
||||||
external: true
|
driver: bridge
|
||||||
|
name: tak_net
|
||||||
tak_backend:
|
tak_backend:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
name: tak_backend
|
name: tak_backend
|
||||||
|
|||||||
@@ -61,4 +61,5 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
vc_net:
|
vc_net:
|
||||||
external: true
|
driver: bridge
|
||||||
|
name: vc_net
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ services:
|
|||||||
- SYS_MODULE
|
- SYS_MODULE
|
||||||
environment:
|
environment:
|
||||||
- WG_HOST=vpn.lazyworkhorse.net
|
- WG_HOST=vpn.lazyworkhorse.net
|
||||||
- PASSWORD=${WG_PASSWORD}
|
- PASSWORD_HASH=${WG_PASSWORD_HASH}
|
||||||
- WG_PORT=51820
|
- WG_PORT=51820
|
||||||
- WG_DEFAULT_ADDRESS=10.8.0.x
|
- WG_DEFAULT_ADDRESS=10.8.0.x
|
||||||
- WG_DEFAULT_DNS=1.1.1.1,8.8.8.8
|
- WG_DEFAULT_DNS=1.1.1.1,8.8.8.8
|
||||||
@@ -22,7 +22,6 @@ services:
|
|||||||
- UI_CHART_TYPE=0
|
- UI_CHART_TYPE=0
|
||||||
ports:
|
ports:
|
||||||
- "51820:51820/udp"
|
- "51820:51820/udp"
|
||||||
- "51821:51821/tcp"
|
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/WireGuard:/etc/wireguard:rw
|
- /mnt/HoardingCow_docker_data/WireGuard:/etc/wireguard:rw
|
||||||
sysctls:
|
sysctls:
|
||||||
@@ -31,8 +30,31 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- vpn_net
|
- vpn_net
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
|
||||||
|
# HTTP → HTTPS redirect
|
||||||
|
- "traefik.http.routers.wireguard-http.rule=Host(vpn.lazyworkhorse.net)"
|
||||||
|
- "traefik.http.routers.wireguard-http.entrypoints=web"
|
||||||
|
- "traefik.http.routers.wireguard-http.middlewares=redirect-to-https"
|
||||||
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||||
|
|
||||||
|
# HTTPS router — protégé par Authelia
|
||||||
|
- "traefik.http.routers.wireguard-https.rule=Host(vpn.lazyworkhorse.net)"
|
||||||
|
- "traefik.http.routers.wireguard-https.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.wireguard-https.tls=true"
|
||||||
|
- "traefik.http.routers.wireguard-https.tls.certresolver=njalla"
|
||||||
|
- "traefik.http.routers.wireguard-https.middlewares=wireguard-auth"
|
||||||
|
|
||||||
|
# Authelia forwardAuth
|
||||||
|
- "traefik.http.middlewares.wireguard-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.lazyworkhorse.net/"
|
||||||
|
- "traefik.http.middlewares.wireguard-auth.forwardauth.trustforwardheader=true"
|
||||||
|
- "traefik.http.middlewares.wireguard-auth.forwardauth.authresponseheaders=X-Forwarded-User,X-Forwarded-Groups"
|
||||||
|
|
||||||
|
# Port interne du web UI wg-easy
|
||||||
|
- "traefik.http.services.wireguard.loadbalancer.server.port=51821"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
vpn_net:
|
vpn_net:
|
||||||
external: true
|
driver: bridge
|
||||||
name: vpn_net
|
name: vpn_net
|
||||||
|
|||||||
Reference in New Issue
Block a user