- Introduced ServerConfig for handling deployment modes and services.

- Added HighAvailability mode for proxying requests to external services.
- Maintained Local mode for embedded services.
- Updated `README.md` and included `SERVER_CONFIG.md` for detailed documentation.
This commit is contained in:
geoffsee
2025-08-28 09:55:39 -04:00
parent c96831d494
commit 45d7cd8819
7 changed files with 823 additions and 29 deletions

View File

@@ -74,9 +74,27 @@ Environment variables for server configuration:
- `SERVER_HOST`: Server bind address (default: `0.0.0.0`)
- `SERVER_PORT`: Server port (default: `8080`)
- `SERVER_CONFIG`: JSON configuration for deployment mode (default: Local mode)
- `RUST_LOG`: Logging level configuration
Example:
#### Deployment Modes
The server supports two deployment modes controlled by `SERVER_CONFIG`:
**Local Mode (default)**: Runs inference and embeddings services locally
```shell
./run_server.sh
```
**HighAvailability Mode**: Proxies requests to external services
```shell
export SERVER_CONFIG='{"serverMode": "HighAvailability"}'
./run_server.sh
```
See [docs/SERVER_CONFIG.md](docs/SERVER_CONFIG.md) for complete configuration options, Docker Compose, and Kubernetes examples.
#### Basic Configuration Example:
```shell
export SERVER_PORT=3000
export RUST_LOG=debug