1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
# TurboLog — Docker Compose for single-node local execution
#
# Usage:
# # Prepare model files in ./models/ in advance (model.onnx, tokenizer.json)
# docker compose up --build
#
# Model file preparation example:
# mkdir -p models
# # Internal artifact storage or direct copy
# # cp /path/to/model.onnx ./models/
# # cp /path/to/tokenizer.json ./models/
#
# Environment variables can be overridden with a .env file:
# TURBOLOG_AUTH_TOKEN=mysecret docker compose up
services:
turbolog:
build:
context: ..
dockerfile: Dockerfile
image: turbolog:local
container_name: turbolog
restart: unless-stopped
ports:
- "8087:8087"
environment:
TURBOLOG_PORT: "8087"
TURBOLOG_DATA_DIR: "/data"
TURBOLOG_MODEL_DIR: "/models"
TURBOLOG_EMBEDDERS: "2"
# Max in-flight requests for local testing (use higher value for production)
TURBOLOG_MAX_INFLIGHT: "200"
# Auth token (leave empty for unauthenticated mode)
TURBOLOG_AUTH_TOKEN: "${TURBOLOG_AUTH_TOKEN:-}"
volumes:
# Persist WAL + index snapshots
- turbolog-data:/data
# Model files — mount host's ./models/ directory as read-only
# Container will start without files but embedding will fail
- ./models:/models:ro
healthcheck:
test:
interval: 15s
timeout: 5s
retries: 3
start_period: 30s
# Run as non-root
user: "10001:10001"
# Read-only root filesystem
read_only: true
tmpfs:
- /tmp:size=64m
# Resource limits (based on local environment; adjust as needed)
deploy:
resources:
limits:
cpus: "2.0"
memory: "768m"
reservations:
cpus: "0.5"
memory: "512m"
volumes:
turbolog-data:
driver: local