Files
ghostnet-openclaw/compose.amd.yaml
T

178 lines
4.6 KiB
YAML

services:
# --- LLM ENGINE ---
ollama:
build:
context: ./ollama
args:
- BASE_IMAGE=ollama/ollama:rocm
container_name: ollama
restart: always
shm_size: ${SHM_SIZE}
privileged: true
devices:
- /dev/dri:/dev/dri:rwm
- /dev/kfd:/dev/kfd:rwm
group_add:
- 44
- 109
rendersecurity_opt:
- label=disable
volumes:
- ./storage/ollama_models:/root/.ollama
- ./ollama/modelfiles:/etc/ollama/modelfiles:ro
environment:
- OLLAMA_HOST=0.0.0.0:11434
- MODEL_LIST=${MODEL_LIST}
- OLLAMA_KEEP_ALIVE=${OLLAMA_KEEP_ALIVE}
- HSA_OVERRIDE_GFX_VERSION=11.0.0
- OLLAMA_FLASH_ATTENTION=1
- http_proxy=http://ollama-proxy:3128
- https_proxy=http://ollama-proxy:3128
- no_proxy=localhost,127.0.0.1,0.0.0.0,ollama,openclaw-agent,tool-router,openclaw-ollama-bridge
ports:
- "11434:11434"
dns:
- ${DNS_SERVER}
networks:
- net.ghost.openclaw
depends_on:
- ollama-proxy
ollama-proxy:
image: docker.io/ubuntu/squid
container_name: ollama-proxy
volumes:
- ./ollama/proxy/squid.conf:/etc/squid/squid.conf:Z
networks:
- net.ghost.openclaw # Erreichbar für Ollama
- net.ghost.tools # Hat Internetzugriff für Registry-Pulls
restart: unless-stopped
stop_grace_period: 3s
# --- CORE AGENT (GATEWAY) ---
openclaw:
#image: ghcr.io/openclaw/openclaw:latest
build:
context: ./openclaw
dockerfile: Containerfile
container_name: openclaw
userns_mode: "keep-id"
environment:
- OPENCLAW_GATEWAY_MODE=local
- OPENCLAW_GATEWAY_PASSWORD=${OPENCLAW_PASSWORD}
- OLLAMA_URL=http://127.0.0.1:11434
- OLLAMA_API_KEY=ollama-local
- DOCKER_HOST=unix:///var/run/docker.sock
ports:
- "8080:8080"
volumes:
- ${HOST_OPENCLAW_JSON_PATH}:/home/node/.openclaw/openclaw.json:Z
- ${HOST_WORKSPACE_PATH}:/home/node/.openclaw/workspace:Z,U
- /run/user/${HOST_USER_ID}/podman/podman.sock:/var/run/docker.sock:Z
- ${HOST_REPOS_PATH}:/repos:Z,U
networks:
- net.ghost.openclaw
depends_on:
- ollama
- tool-router
# --- NETWORK TUNNEL (SIDECAR) ---
openclaw-ollama-bridge:
image: docker.io/alpine/socat:latest
container_name: openclaw-ollama-bridge
network_mode: "service:openclaw"
command: TCP-LISTEN:11434,fork TCP:ollama:11434
stop_grace_period: 1s
restart: always
depends_on:
- openclaw
# --- TOOL ROUTER (GATEWAY) ---
tool-router:
build:
context: ./tools/router
dockerfile: Containerfile
container_name: tool-router
init: true
working_dir: /app
environment:
- PORT=3000
- LOG_LEVEL=debug
expose:
- "3000"
dns:
- ${DNS_SERVER}
networks:
- net.ghost.openclaw
- net.ghost.tools
depends_on:
- tool-searchfetch
# --- SEARCHFETCH TOOL ---
tool-searchfetch:
build:
context: ./tools/searchfetch
dockerfile: Containerfile
container_name: tool-searchfetch
environment:
- SEARXNG_URL=http://tool-searchfetch-searxng:8080
networks:
- net.ghost.tools
depends_on:
- tool-searchfetch-searxng
healthcheck:
test: ["CMD-SHELL", "timeout 2s nc -z localhost 3000 || exit 1"]
interval: 10s
timeout: 5s
retries: 3
# --- SEARXNG SERVICE FOR SEARCHFETCH TOOL ---
tool-searchfetch-searxng:
image: docker.io/searxng/searxng:latest
container_name: tool-searchfetch-searxng
restart: always
volumes:
- ./tools/searchfetch/config/searxng.settings.yml:/etc/searxng/settings.yml:ro,Z
- ./storage/searxng:/tmp:Z
environment:
- SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
- SEARXNG_VALKEY_URL=redis://tool-searchfetch-valkey:6379/0
expose:
- "8080"
dns:
- ${DNS_SERVER}
networks:
- net.ghost.tools
depends_on:
- tool-searchfetch-valkey
tool-searchfetch-valkey:
image: docker.io/valkey/valkey:8-alpine
container_name: tool-searchfetch-valkey
restart: always
user: "1000:1000"
volumes:
- ./storage/searxng_valkey:/data:Z,U
networks:
- net.ghost.tools
tool-test:
image: docker.io/nikolaik/python-nodejs:python3.14-nodejs26-slim
container_name: tool-test
command: ["sh", "-c", "exec tail -f /dev/null"]
dns:
- ${DNS_SERVER}
networks:
- net.ghost.tools
networks:
net.ghost.openclaw:
name: net.ghost.openclaw
driver: bridge
internal: true
net.ghost.tools:
name: net.ghost.tools
driver: bridge