Files
sloppyware/docs/configuration.md
2026-11-22 02:02:18 +01:00

83 lines
1.9 KiB
Markdown

# Chronos Configuration
Chronos uses a TOML configuration file for its settings. The configuration file is located at `config/chronos.toml` by default.
## Example Configuration
```toml
[server]
host = "127.0.0.1"
port = 8080
ssl_enabled = false
[database]
url = "postgres://chronos:password@localhost/chronos"
max_connections = 20
[redis]
enabled = true
url = "redis://localhost:6379"
[scheduler]
enabled = true
poll_interval_seconds = 5
[workers]
concurrency = 8
heartbeat_interval_seconds = 10
[execution]
default_timeout_seconds = 300
max_output_bytes = 10485760
max_processes = 100
[logging]
level = "info"
format = "json"
[security]
session_secret = "your-secret-here"
```
## Configuration Sections
### `[server]`
- `host`: Host address to bind the API server (default: "127.0.0.1")
- `port`: Port number for the API server (default: 8080)
- `ssl_enabled`: Enable HTTPS (default: false)
### `[database]`
- `url`: PostgreSQL connection string
- `max_connections`: Maximum concurrent database connections (default: 20)
### `[redis]`
- `enabled`: Enable Redis caching (default: true)
- `url`: Redis server connection URL
### `[scheduler]`
- `enabled`: Enable the scheduler service (default: true)
- `poll_interval_seconds`: How often to check for scheduled jobs (default: 5)
### `[workers]`
- `concurrency`: Number of concurrent worker threads (default: 8)
- `heartbeat_interval_seconds`: Interval for worker heartbeat updates (default: 10)
### `[execution]`
- `default_timeout_seconds`: Default timeout for job execution in seconds (default: 300)
- `max_output_bytes`: Maximum output size for job execution (default: 10485760)
- `max_processes`: Maximum number of processes that can be spawned per execution (default: 100)
### `[logging]`
- `level`: Log level ("trace", "debug", "info", "warn", "error") (default: "info")
- `format`: Log format ("json" or "text") (default: "json")
### `[security]`
- `session_secret`: Secret key for session encryption (required)