docker compose up command starts all five services: the gateway, Redis, Qdrant, Prometheus, and Grafana.
Services
| Service | Image | Port(s) | Purpose |
|---|---|---|---|
| gateway | built from source | 8080 | API gateway |
| redis | redis:7-alpine | 6379 | Short-term cache (key/value) |
| qdrant | qdrant/qdrant:v1.14.1 | 6333, 6334 | Vector store for semantic cache |
| prometheus | prom/prometheus:v3.2.1 | 9090 | Metrics collection |
| grafana | grafana/grafana:11.5.2 | 3000 | Metrics dashboards |
docker-compose.yml
Volume mounts
gateway./config.yaml:/etc/draft-thinker/config.yaml:ro— mounts your localconfig.yamlinto the container at the path the gateway reads on startup. Pass a different file by editing this mount; see custom config below.
./prometheus.yml:/etc/prometheus/prometheus.yml:ro— Prometheus scrape configuration. By default this scrapes the gateway atgateway:8080/metricsevery 15 seconds.
./grafana/provisioning:/etc/grafana/provisioning:ro— datasource and dashboard provisioning files../grafana/dashboards:/var/lib/grafana/dashboards:ro— pre-built dashboard JSON files.
qdrant_data(named volume) — persists vector store data across container restarts. The volume is declared at the bottom of the Compose file and managed by Docker.
Redis memory settings
Redis is started with two flags:--maxmemory 256mb— caps memory usage at 256 MB.--maxmemory-policy allkeys-lru— evicts the least-recently-used keys when the limit is reached, keeping the cache from growing unbounded.
Deployment workflow
Set your OpenAI API key
Export
OPENAI_API_KEY in your shell before running Compose. Docker Compose reads it from the environment and passes it to the gateway container.Start all services
From the repository root:Docker builds the gateway image from the local
Dockerfile, pulls the other images, and starts all five containers in the background.Verify the gateway is running
Open Grafana (optional)
Navigate to http://localhost:3000 and log in with the default credentials (
admin / admin). Pre-provisioned dashboards are available immediately.Common operations
View logs for a specific service:qdrant_data volume. To also delete the volume:
Custom config
The gateway loads its configuration from the file mounted at/etc/draft-thinker/config.yaml. The Compose file mounts ./config.yaml from the repository root by default:
--config flag in the gateway’s CMD. For example, to point to a different path inside the container: