Initial commit: Add Ollama Proxy project files

This commit is contained in:
yshtcn
2025-01-23 00:13:12 +08:00
commit 49b834ff93
11 changed files with 662 additions and 0 deletions

19
docker-compose.yml Normal file
View File

@@ -0,0 +1,19 @@
version: '3'
services:
ollama-proxy:
build: .
container_name: ollama-proxy
ports:
- "11434:11434"
environment:
- OLLAMA_URL=${OLLAMA_URL:-http://localhost:11434}
- WAKE_URL=${WAKE_URL:-http://localhost:11434/api/generate}
- TIMEOUT_SECONDS=${TIMEOUT_SECONDS:-10}
- PORT=${PORT:-11434}
- WAKE_INTERVAL=${WAKE_INTERVAL:-10}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/health"]
interval: 30s
timeout: 10s
retries: 3