- pin builder and runtime to the same Debian release (trixie): the floating rust:1-slim builder drifted to a newer glibc than the bookworm runtime, so freshly built images crashed on start with 'GLIBC_2.39 not found' - install curl in the runtime image — ready-.cmf imports download with it - keep all gateway state under /app/data (CORTIQ_GATEWAY_HOME) and run as root so bind-mounted host folders on Docker Desktop are writable; pass --user 10001 to harden when not bind-mounting - persist /app/data via a cortiq-data volume in docker-compose - fail imports immediately with the path and reason when the models dir cannot be created, and annotate curl exit codes 23/22 with readable hints - exclude local models/*.cmf from the docker build context
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
# Quick start: Cortiq Gateway + a local model (Ollama).
|
|
#
|
|
# docker compose up -d
|
|
# docker compose exec ollama ollama pull qwen2.5:0.5b # pull the model once
|
|
# # → OpenAI-compatible API at http://localhost:9000/v1
|
|
# # → admin console at http://localhost:9000/admin (token: change-me)
|
|
#
|
|
# For smart routing, add a [router] key to config/gateway.compose.toml
|
|
# (or set CORTIQ_ROUTER_KEY and point [router] at allaigate — see docs/ROUTER.md).
|
|
services:
|
|
gateway:
|
|
image: ghcr.io/infosave2007/cortiq-gateway:latest
|
|
ports:
|
|
- "9000:9000"
|
|
environment:
|
|
CORTIQ_ADMIN_TOKEN: change-me
|
|
CORTIQ_ROUTER_KEY: ${CORTIQ_ROUTER_KEY:-}
|
|
volumes:
|
|
- ./config/gateway.compose.toml:/app/config/gateway.toml:ro
|
|
# downloaded .cmf models + stats persist here across recreates; swap the
|
|
# named volume for a host folder (e.g. ./models:/app/data/models) if you
|
|
# want the files visible next to the compose file
|
|
- cortiq-data:/app/data
|
|
depends_on:
|
|
- ollama
|
|
restart: unless-stopped
|
|
|
|
ollama:
|
|
image: ollama/ollama
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama:/root/.ollama
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
cortiq-data:
|
|
ollama:
|