-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcompose-test-openwebui.yaml
More file actions
66 lines (59 loc) · 1.99 KB
/
compose-test-openwebui.yaml
File metadata and controls
66 lines (59 loc) · 1.99 KB
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
services:
# Claude Code API service
claude-api:
build: .
ports:
- "${API_PORT:-8100}:8000" # HTTP API
- "${API_HTTPS_PORT:-8543}:8443" # HTTPS Admin/Auth
environment:
# Admin password for token exchange
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}
# Your Claude OAuth token (required)
# Get from: https://claude.ai/settings/oauth
- CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN}
# Optional settings
- NODE_ENV=${NODE_ENV:-production}
- PORT=8000
- HTTPS_PORT=8443
volumes:
# Persist API key mappings
- ./data:/app/data
# Docker volume for persistent Claude CLI authentication
- claude-auth:/home/claude/.claude
# Optional: Use custom certificates
# - ./certs:/app/certs
# Development: Mount source for hot reload
# - ./src:/app/src:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:8000/v1/health', (res) => process.exit(res.statusCode === 200 ? 0 : 1))"]
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
# OpenWebUI for testing the API
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: claude-api-openwebui-test
ports:
- "${OPEN_WEBUI_PORT:-8080}:8080"
volumes:
- open-webui:/app/backend/data
environment:
# Use Claude Code API as the OpenAI API backend
- OPENAI_API_KEY=${TEST_API_KEY}
- OPENAI_API_BASE_URL=${OPENAI_API_BASE_URL:-http://claude-api:8000/v1}
# Disable Ollama integration
- ENABLE_OLLAMA_API=false
- OLLAMA_BASE_URL=""
# Set a secure session key
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-test-secret-key-change-in-production}
# Enable OpenAI API models
- ENABLE_OPENAI_API=true
depends_on:
claude-api:
condition: service_healthy
restart: unless-stopped
volumes:
claude-auth:
open-webui: