docs: add docker-compose quickstart (gateway + Ollama) and GHCR badge
- docker-compose.yml + config/gateway.compose.toml (routes to a local Ollama service) - README (EN+RU): ghcr badge + Docker Compose section
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project are documented here.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **Docker Compose** quickstart (`docker-compose.yml` + `config/gateway.compose.toml`):
|
||||
gateway + a local Ollama model in one command. GHCR badge in the READMEs.
|
||||
|
||||
## [0.2.2] - 2026-07-01
|
||||
|
||||
### Added
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
**English** · [Русский](https://github.com/infosave2007/cortiq-gateway/blob/master/README.ru.md)
|
||||
|
||||
[](https://crates.io/crates/cortiq-gateway)
|
||||
[](https://github.com/infosave2007/cortiq-gateway/pkgs/container/cortiq-gateway)
|
||||
[](https://github.com/infosave2007/cortiq-gateway/actions/workflows/ci.yml)
|
||||
[](https://github.com/infosave2007/cortiq-gateway/blob/master/LICENSE)
|
||||

|
||||
@@ -68,6 +69,17 @@ cargo build --release # ./target/release/cortiq-gateway
|
||||
The image ships a default config and runs out of the box; mount `/app/config` (with a
|
||||
`gateway.toml`) to use your own. Tags: `:latest`, `:X.Y.Z`, `:edge` (linux/amd64 + arm64).
|
||||
|
||||
**Docker Compose** — gateway + a local Ollama model in one command:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
docker compose exec ollama ollama pull qwen2.5:0.5b # pull a model once
|
||||
# → OpenAI API at http://localhost:9000/v1 · admin at /admin (token: change-me)
|
||||
```
|
||||
|
||||
See [`docker-compose.yml`](docker-compose.yml). For smart routing, set `CORTIQ_ROUTER_KEY`
|
||||
and add a `[router]` (see [docs/ROUTER.md](docs/ROUTER.md)).
|
||||
|
||||
---
|
||||
|
||||
## 🖥️ Admin console
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
[English](README.md) · **Русский**
|
||||
|
||||
[](https://crates.io/crates/cortiq-gateway)
|
||||
[](https://github.com/infosave2007/cortiq-gateway/pkgs/container/cortiq-gateway)
|
||||
[](LICENSE)
|
||||

|
||||

|
||||
@@ -66,6 +68,17 @@ cargo build --release # ./target/release/cortiq-gateway
|
||||
(с `gateway.toml`), чтобы использовать свой. Теги: `:latest`, `:X.Y.Z`, `:edge`
|
||||
(linux/amd64 + arm64).
|
||||
|
||||
**Docker Compose** — шлюз + локальная модель Ollama одной командой:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
docker compose exec ollama ollama pull qwen2.5:0.5b # один раз скачать модель
|
||||
# → OpenAI API на http://localhost:9000/v1 · панель на /admin (токен: change-me)
|
||||
```
|
||||
|
||||
См. [`docker-compose.yml`](docker-compose.yml). Для умного роутинга задайте
|
||||
`CORTIQ_ROUTER_KEY` и добавьте `[router]` (см. [docs/ROUTER.ru.md](docs/ROUTER.ru.md)).
|
||||
|
||||
---
|
||||
|
||||
## 🖥️ Панель управления
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Config used by docker-compose.yml — routes to the Ollama service in the same
|
||||
# compose network. Send model="local" (pinned) or "cortiq-auto" (falls back to the
|
||||
# default model when no router is configured). Add a [router] key to enable smart routing.
|
||||
listen = "0.0.0.0:9000"
|
||||
|
||||
[router]
|
||||
url = "http://localhost:8080" # optional; pinned/default works without a router
|
||||
timeout_ms = 800
|
||||
|
||||
[[models]]
|
||||
id = "local"
|
||||
provider = "openai"
|
||||
base_url = "http://ollama:11434/v1" # the Ollama service (see docker-compose.yml)
|
||||
model = "qwen2.5:0.5b"
|
||||
cost_tier = "cheap"
|
||||
|
||||
[routing]
|
||||
default = "local"
|
||||
|
||||
[protocols]
|
||||
openai_chat = true
|
||||
|
||||
[admin]
|
||||
enabled = true
|
||||
|
||||
[telemetry]
|
||||
metrics = true
|
||||
@@ -0,0 +1,33 @@
|
||||
# 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
|
||||
depends_on:
|
||||
- ollama
|
||||
restart: unless-stopped
|
||||
|
||||
ollama:
|
||||
image: ollama/ollama
|
||||
ports:
|
||||
- "11434:11434"
|
||||
volumes:
|
||||
- ollama:/root/.ollama
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
ollama:
|
||||
Reference in New Issue
Block a user