feat: introduce YAML configuration

This commit is contained in:
2025-05-06 13:19:20 +02:00
parent 6017bf86f9
commit 3bbb689cac
9 changed files with 170 additions and 25 deletions

View File

@@ -6,6 +6,7 @@ A simple daemon and REST API to manage:
- authorized SSH keys through the user's authorized_keys file
## Requirements
- Make
- Go 1.19 or later
- NetworkManager
@@ -50,6 +51,20 @@ All endpoints except `/health` require authentication via an API token passed in
### Request/Response Format
All endpoints use JSON for request and response payloads.
## Configuration
### File
The default config file location is `/etc/rcond/config.yaml`.
It can be overwritten by environment variables and flags.
Example configuration:
```yaml
rcond:
addr: 0.0.0.0:8080
api_token: 1234567890
```
### Environment Variables
| Environment Variable | Description | Default |