Files
anyllm-proxy/docker-compose.yml
T
whit3rabbitandClaude Sonnet 4.6 1f9bb02968 feat: add Docker support, Gemini input handler, and batch engine improvements
Adds multi-arch Docker build with docker-compose, GitHub Actions CI workflow,
Gemini native input parsing, batch engine SQLite/file/webhook refactors,
and Bedrock streaming fixes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 12:01:24 -05:00

73 lines
2.3 KiB
YAML

# docker-compose.yml
#
# Quick start:
# cp .env.example .env # add OPENAI_API_KEY (or other backend key)
# docker compose up # proxy on :3000
#
# Enable admin UI (persists token to /data/.admin_token):
# WEBUI=1 docker compose up # or set WEBUI=1 in .env; admin on localhost:3001
#
# Enable Redis (distributed rate limiting; requires binary built with --features redis):
# docker compose --profile redis up
#
# Docker-internal backend URLs — use service names, not localhost:
# OPENAI_BASE_URL=http://ollama:11434/v1 (if adding an ollama service below)
# REDIS_URL=redis://redis:6379 (redis profile)
# OPENAI_BASE_URL=http://vllm:8000/v1 (local vLLM deployment)
#
# Adding a local backend (example):
# services:
# ollama:
# image: ollama/ollama
# volumes: [ollama_data:/root/.ollama]
# volumes:
# ollama_data:
services:
proxy:
build: .
# Uncomment to use a pre-built image instead of building locally:
# image: followthewhit3rabbit/anyllm-proxy:latest
env_file:
- path: .env
required: false
environment:
# Bind admin UI to all interfaces inside the container so Docker port
# mapping works. The host-side 127.0.0.1:3001 binding below limits
# external exposure to localhost on the Docker host.
ADMIN_BIND: "0.0.0.0"
ADMIN_DB_PATH: /data/admin.db
ADMIN_TOKEN_PATH: /data/.admin_token
# WEBUI: "1" # uncomment to always enable admin UI
# PROXY_CONFIG: /config/config.yaml
ports:
- "3000:3000"
# Admin UI: only reachable from localhost on the Docker host
- "127.0.0.1:3001:3001"
volumes:
- proxy_data:/data
# Bind-mount a local config directory (read-only):
# - ./config:/config:ro
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
# Redis is opt-in. Start with: docker compose --profile redis up
# Set REDIS_URL=redis://redis:6379 in .env to connect the proxy.
redis:
image: redis:7-alpine
profiles:
- redis
command: redis-server --save 60 1 --loglevel warning
volumes:
- redis_data:/data
restart: unless-stopped
volumes:
proxy_data:
redis_data: