Files
GopherGate/deployment.md
hobokenchicken 6b10d4249c
Some checks failed
CI / Check (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Formatting (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Release Build (push) Has been cancelled
feat: migrate backend from rust to go
This commit replaces the Axum/Rust backend with a Gin/Go implementation. The original Rust code has been archived in the 'rust' branch.
2026-03-19 10:30:05 -04:00

53 lines
1.1 KiB
Markdown

# Deployment Guide (Go)
This guide covers deploying the Go-based LLM Proxy Gateway.
## Environment Setup
1. **Mandatory Configuration:**
Create a `.env` file from the example:
```bash
cp .env.example .env
```
Ensure `LLM_PROXY__ENCRYPTION_KEY` is set to a secure 32-byte string.
2. **Data Directory:**
The proxy stores its database in `./data/llm_proxy.db` by default. Ensure this directory exists and is writable.
## Binary Deployment
### 1. Build
```bash
go build -o llm-proxy ./cmd/llm-proxy
```
### 2. Run
```bash
./llm-proxy
```
## Docker Deployment
The project includes a multi-stage `Dockerfile` for minimal image size.
### 1. Build Image
```bash
docker build -t llm-proxy .
```
### 2. Run Container
```bash
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.db` file.
- **Monitoring:** Monitor the `/health` endpoint for system status.