mirror of
https://github.com/geoffsee/predict-otron-9001.git
synced 2025-09-08 22:46:44 +00:00
- 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:
20
README.md
20
README.md
@@ -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
|
||||
|
Reference in New Issue
Block a user