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:
infosave2007
2026-07-01 13:40:24 +03:00
parent 85fc508f04
commit 630149d141
5 changed files with 91 additions and 0 deletions
+6
View File
@@ -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
+12
View File
@@ -3,6 +3,7 @@
**English** · [Русский](https://github.com/infosave2007/cortiq-gateway/blob/master/README.ru.md)
[![Crates.io](https://img.shields.io/crates/v/cortiq-gateway.svg)](https://crates.io/crates/cortiq-gateway)
[![Docker](https://img.shields.io/badge/ghcr.io-cortiq--gateway-2496ED?logo=docker&logoColor=white)](https://github.com/infosave2007/cortiq-gateway/pkgs/container/cortiq-gateway)
[![CI](https://github.com/infosave2007/cortiq-gateway/actions/workflows/ci.yml/badge.svg)](https://github.com/infosave2007/cortiq-gateway/actions/workflows/ci.yml)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/infosave2007/cortiq-gateway/blob/master/LICENSE)
![Rust](https://img.shields.io/badge/Rust-2021-orange.svg)
@@ -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
+13
View File
@@ -2,6 +2,8 @@
[English](README.md) · **Русский**
[![Crates.io](https://img.shields.io/crates/v/cortiq-gateway.svg)](https://crates.io/crates/cortiq-gateway)
[![Docker](https://img.shields.io/badge/ghcr.io-cortiq--gateway-2496ED?logo=docker&logoColor=white)](https://github.com/infosave2007/cortiq-gateway/pkgs/container/cortiq-gateway)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
![Rust](https://img.shields.io/badge/Rust-2021-orange.svg)
![Status](https://img.shields.io/badge/status-active-success.svg)
@@ -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)).
---
## 🖥️ Панель управления
+27
View File
@@ -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
+33
View File
@@ -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: