metal-kompanion/docker/compose.yml

49 lines
1.2 KiB
YAML

version: "3.9"
name: metal-kompanion
networks:
komnet:
driver: bridge
internal: true
services:
# Local model host
ollama:
image: ollama/ollama:latest
restart: unless-stopped
ports: ["127.0.0.1:11434:11434"]
volumes:
- ollama:/root/.ollama
networks: [komnet]
# TOR proxy (SOCKS5)
tor:
image: dperson/torproxy
restart: unless-stopped
command: -a 0.0.0.0
ports: ["127.0.0.1:9050:9050"]
networks: [komnet]
# Companion runner (Python) — reads tasks.jsonl, writes journal/ledger
runner:
image: python:3.11-slim
restart: unless-stopped
working_dir: /app
environment:
XDG_STATE_HOME: /state
XDG_CONFIG_HOME: /config
XDG_CACHE_HOME: /cache
# Route all egress through TOR by default (except localhost)
ALL_PROXY: socks5h://tor:9050
NO_PROXY: 127.0.0.1,localhost
depends_on: [ollama, tor]
volumes:
- /home/kompanion/.local/state/kompanion:/state/kompanion
- /home/kompanion/.config/kompanion:/config/kompanion:ro
- /home/kompanion/.cache/kompanion:/cache/kompanion
- /home/kompanion/metal-kompanion-runtime:/app:ro
command: ["python3","kom_runner.py"]
networks: [komnet]
volumes:
ollama: