mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
Created Configuration Reference (markdown)
@@ -0,0 +1,83 @@
|
||||
# Bichon Configuration Reference
|
||||
|
||||
Each setting can be specified as a **command-line argument** (`--option-name`) or via an **environment variable** (auto-detected by Bichon). Settings are grouped by functionality.
|
||||
|
||||
---
|
||||
|
||||
## 1. Logging & Output
|
||||
|
||||
| Option | CLI / Env | Default | Description |
|
||||
|--------|-----------|---------|-------------|
|
||||
| `bichon_log_level` | `--bichon-log-level` / `BICHON_LOG_LEVEL` | `"info"` | Sets the log level for Bichon. Options: `trace`, `debug`, `info`, `warn`, `error`. |
|
||||
| `bichon_ansi_logs` | `--bichon-ansi-logs` / `BICHON_ANSI_LOGS` | `true` | Enable ANSI color formatting in logs. |
|
||||
| `bichon_log_to_file` | `--bichon-log-to-file` / `BICHON_LOG_TO_FILE` | `false` | Write logs to a file instead of stdout. |
|
||||
| `bichon_json_logs` | `--bichon-json-logs` / `BICHON_JSON_LOGS` | `false` | Enable JSON formatted logs. |
|
||||
| `bichon_max_server_log_files` | `--bichon-max-server-log-files` / `BICHON_MAX_SERVER_LOG_FILES` | `5` | Maximum number of server log files to retain. |
|
||||
|
||||
---
|
||||
|
||||
## 2. Server & Network
|
||||
|
||||
| Option | CLI / Env | Default | Description |
|
||||
|--------|-----------|---------|-------------|
|
||||
| `bichon_http_port` | `--bichon-http-port` / `BICHON_HTTP_PORT` | `15630` | Port for the HTTP server. |
|
||||
| `bichon_bind_ip` | `--bichon-bind-ip` / `BICHON_BIND_IP` | `"0.0.0.0"` | IPv4 address the server binds to (required in cluster mode). Must be valid IPv4. |
|
||||
| `bichon_public_url` | `--bichon-public-url` / `BICHON_PUBLIC_URL` | `"http://localhost:15630"` | Public URL for accessing Bichon. |
|
||||
| `bichon_cors_origins` | `--bichon-cors-origins` / `BICHON_CORS_ORIGINS` | `"http://localhost:5173, http://localhost:15630, *"` | Comma-separated list of allowed CORS origins. `*` allows all. |
|
||||
| `bichon_cors_max_age` | `--bichon-cors-max-age` / `BICHON_CORS_MAX_AGE` | `86400` | Maximum age in seconds for CORS preflight cache. |
|
||||
| `bichon_enable_access_token` | `--bichon-enable-access-token` / `BICHON_ENABLE_ACCESS_TOKEN` | `false` | Enable HTTP access token validation. |
|
||||
| `bichon_enable_rest_https` | `--bichon-enable-rest-https` / `BICHON_ENABLE_REST_HTTPS` | `false` | Enable HTTPS for REST API endpoints. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Database & Storage
|
||||
|
||||
| Option | CLI / Env | Default | Description |
|
||||
|--------|-----------|---------|-------------|
|
||||
| `bichon_root_dir` | `--bichon-root-dir` / `BICHON_ROOT_DIR` | *none* | Absolute path for Bichon data directory. Must exist. |
|
||||
| `bichon_metadata_cache_size` | `--bichon-metadata-cache-size` / `BICHON_METADATA_CACHE_SIZE` | `134_217_728` | Cache size (bytes) for metadata database. |
|
||||
| `bichon_envelope_cache_size` | `--bichon-envelope-cache-size` / `BICHON_ENVELOPE_CACHE_SIZE` | `1_073_741_824` | Cache size (bytes) for envelope database. |
|
||||
| `bichon_encrypt_password` | `--bichon-encrypt-password` / `BICHON_ENCRYPT_PASSWORD` | `"change-this-default-password-now"` | Encryption password for database/files. ⚠️ Change in production. |
|
||||
|
||||
---
|
||||
|
||||
## 4. Email Synchronization
|
||||
|
||||
| Option | CLI / Env | Default | Description |
|
||||
|--------|-----------|---------|-------------|
|
||||
| `bichon_sync_concurrency` | `--bichon-sync-concurrency` / `BICHON_SYNC_CONCURRENCY` | #CPU cores × 2 | Maximum number of concurrent email sync tasks. Must be ≥ 1. |
|
||||
|
||||
---
|
||||
|
||||
## 5. HTTP / API Features
|
||||
|
||||
| Option | CLI / Env | Default | Description |
|
||||
|--------|-----------|---------|-------------|
|
||||
| `bichon_http_compression_enabled` | `--bichon-http-compression-enabled` / `BICHON_HTTP_COMPRESSION_ENABLED` | `true` | Enable HTTP compression for API responses. |
|
||||
|
||||
---
|
||||
|
||||
## 6. Compression Algorithm (Optional Enum)
|
||||
|
||||
| Algorithm | CLI Value | Description |
|
||||
|-----------|-----------|-------------|
|
||||
| None | `none` | No compression. |
|
||||
| Gzip | `gzip` | Use Gzip compression. |
|
||||
| Brotli | `brotli` | Use Brotli compression. |
|
||||
| Zstd | `zstd` | Use Zstandard compression. |
|
||||
| Deflate | `deflate` | Use Deflate compression. |
|
||||
|
||||
---
|
||||
|
||||
## Usage Notes
|
||||
|
||||
1. **Command-line arguments** take precedence over environment variables:
|
||||
|
||||
```bash
|
||||
bichon --bichon-log-level debug --bichon-http-port 8080
|
||||
```
|
||||
2. **Environment variables can be used to configure without CLI arguments:
|
||||
```bash
|
||||
export BICHON_LOG_LEVEL=debug
|
||||
export BICHON_HTTP_PORT=8080
|
||||
```
|
||||
Reference in New Issue
Block a user