# Builds the image from this checkout. For the server use deploy/compose.yaml (released image). name: kaname x-app: &app image: kaname:local build: . env_file: .env # Container paths win over local-dev paths in .env. environment: DATABASE_URL: file:/data/app.db MODELS_DIR: /models HF_HOME: /data/hf-home restart: unless-stopped services: worker: <<: *app command: worker environment: DATABASE_URL: file:/data/app.db MODELS_DIR: /models HF_HOME: /data/hf-home DOCKER_HOST: tcp://docker-proxy:2375 volumes: [data:/data, models:/models] web: <<: *app ports: ["${WEB_PORT:-3000}:3000"] volumes: [data:/data] # Docker API for runtimes (llama.cpp / vLLM containers), limited to what Kaname needs: # containers, images, networks, info. Not reachable from outside the compose network. # Remove this service (and DOCKER_HOST on the worker) to run Kaname as a pure downloader. docker-proxy: image: tecnativa/docker-socket-proxy:v0.5.0 environment: CONTAINERS: 1 IMAGES: 1 INFO: 1 NETWORKS: 1 POST: 1 ALLOW_START: 1 ALLOW_STOP: 1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro restart: unless-stopped volumes: data: models: