This commit replaces the Axum/Rust backend with a Gin/Go implementation. The original Rust code has been archived in the 'rust' branch.
1.1 KiB
1.1 KiB
Deployment Guide (Go)
This guide covers deploying the Go-based LLM Proxy Gateway.
Environment Setup
-
Mandatory Configuration: Create a
.envfile from the example:cp .env.example .envEnsure
LLM_PROXY__ENCRYPTION_KEYis set to a secure 32-byte string. -
Data Directory: The proxy stores its database in
./data/llm_proxy.dbby default. Ensure this directory exists and is writable.
Binary Deployment
1. Build
go build -o llm-proxy ./cmd/llm-proxy
2. Run
./llm-proxy
Docker Deployment
The project includes a multi-stage Dockerfile for minimal image size.
1. Build Image
docker build -t llm-proxy .
2. Run Container
docker run -d \
--name llm-proxy \
-p 8080:8080 \
-v $(pwd)/data:/app/data \
--env-file .env \
llm-proxy
Production Considerations
- SSL/TLS: It is recommended to run the proxy behind a reverse proxy like Nginx or Caddy for SSL termination.
- Backups: Regularly backup the
data/llm_proxy.dbfile. - Monitoring: Monitor the
/healthendpoint for system status.