Configuration
Dispatch uses YAML configuration files with environment variable overrides.
Config Files
| File | Environment |
|---|---|
| config.local.yaml | Local development |
| config.dev.yaml | Development/staging |
| config.prod.yaml | Production |
The ENV environment variable selects which file to load.
Server
yaml
server:
port: 8080
mode: release # debug | release
trusted_proxies:
- 10.0.0.0/8Database
yaml
database:
host: localhost
port: 5432
name: dispatch
ssl_mode: disable
max_open_conns: 25
max_idle_conns: 5Credentials via env: DB_USER, DB_PASSWORD.
Redis
yaml
redis:
host: localhost
port: 6379Password via env: REDIS_PASSWORD (optional).
SMTP Server
yaml
smtp:
host: 0.0.0.0
port: 587
tls_port: 465
domain: smtp.dispatch.techtranslab.com
max_message_size: 10485760 # 10 MB
max_recipients: 50Authentication
yaml
auth:
jwt_expiry: 24h
webauthn:
rp_display_name: Dispatch
rp_id: dispatch.techtranslab.com
rp_origin: https://dispatch.techtranslab.comLogging
yaml
logging:
level: info # debug | info | warn | error
format: json # text | json
output: stdout # stdout | file | both
file_path: logs/backend.log
rotate_max_size_mb: 100
rotate_max_backups: 7
rotate_compress: trueRate Limiting
Built-in IP-based rate limits:
| Endpoint | Limit |
|---|---|
| Register / Login | 10 req / 5 min |
| Forgot password | 5 req / 15 min |
| Resend verification | 5 req / 10 min |
| SMS requests | 3 req / 1 hr |
| SMTP login attempts | 10 / 15 min per IP |
| SMTP connections | 5 concurrent per IP |