4c9ed3c24b
Complete rewrite from Python/FastAPI to Go/Gin: - Go backend: auth (API keys + bcrypt), llama.cpp subprocess manager, hot-swap multi-model, rate limiting, quota system, webhooks - Vue 3 SPA admin panel (src/) with Tailwind CSS - Deployment: Docker multi-stage, docker-compose, nginx, systemd - GORM/SQLite models: ApiKey, Model, UsageLog, Quota, Webhook - REST API: /api/v1/admin/* (keys, models, chat, usage, health) - Embedded frontend via go:embed (build output at web/dist/) Removed legacy Python artifacts (app/, tests/, pyproject.toml, etc.)
61 lines
1009 B
Caddyfile
61 lines
1009 B
Caddyfile
# LlamaLink Caddyfile
|
|
# Auto HTTPS via Let's Encrypt
|
|
|
|
llamalink.local {
|
|
reverse_proxy llamalink:8000
|
|
|
|
log {
|
|
output file /var/log/caddy/llamalink.log
|
|
}
|
|
|
|
handle /health {
|
|
reverse_proxy llamalink:8000
|
|
}
|
|
|
|
handle /ready {
|
|
reverse_proxy llamalink:8000
|
|
}
|
|
|
|
handle /v1/chat/completions {
|
|
reverse_proxy llamalink:8000 {
|
|
flush_interval -1
|
|
}
|
|
}
|
|
|
|
handle {
|
|
reverse_proxy llamalink:8000
|
|
}
|
|
}
|
|
|
|
# Production with TLS
|
|
# Replace with your domain
|
|
llamalink.example.com {
|
|
reverse_proxy llamalink:8000
|
|
|
|
tls {
|
|
protocols tls1.2 tls1.3
|
|
}
|
|
|
|
log {
|
|
output file /var/log/caddy/llamalink.log
|
|
}
|
|
|
|
handle /health {
|
|
reverse_proxy llamalink:8000
|
|
}
|
|
|
|
handle /ready {
|
|
reverse_proxy llamalink:8000
|
|
}
|
|
|
|
handle /v1/chat/completions {
|
|
reverse_proxy llamalink:8000 {
|
|
flush_interval -1
|
|
}
|
|
}
|
|
|
|
handle {
|
|
reverse_proxy llamalink:8000
|
|
}
|
|
}
|