Configuration¶
Weather generates its configuration at runtime with sane defaults and keeps the live configuration in OS-specific directories, not in the repository.
Configuration Files¶
| File | Location | Purpose |
|---|---|---|
server.yml | {config_dir}/server.yml | Server configuration |
cli.yml | ~/.config/apimgr/weather/cli.yml | CLI client configuration |
Use the admin panel for routine changes:
- Server settings:
https://wthr.top/admin - User settings:
https://wthr.top/users/settings
Precedence¶
Configuration is applied in this order:
- Command-line flags
- Environment variables
- Generated config files
- Embedded defaults
Important Rules¶
server.ymlis generated on first run- Do not keep runtime config files in the repository
- Do not store plaintext passwords or tokens in
server.yml - All server settings must also be editable from the admin WebUI
- Most changes apply live without restarting the service
Common Settings¶
Server¶
server:
mode: production
address: 0.0.0.0
# Port is chosen on first run from the configured/default range
port: 64580
Weather Data¶
weather:
cache_ttl: 15m
severe_weather:
poll_interval: 5m
earthquakes:
min_magnitude: 2.5
hurricanes:
update_interval: 15m
GeoIP¶
Notifications¶
notifications:
websocket:
enabled: true
email:
enabled: false
smtp:
host: smtp.example.com
port: 587
username: weather@example.com
Paths¶
Weather separates configuration, data, and logs:
| Type | Location |
|---|---|
| Config | {config_dir}/ |
| Data | {data_dir}/ |
| Logs | {log_dir}/ |
Docker deployments typically mount:
Language and Theme¶
Language selection follows AI.md PART 31:
?lang=query parameterlangcookieAccept-Language- English fallback
Theme and language preferences can be managed without JavaScript and persist through cookies/user settings.
Validation¶
Use the existing project commands for validation: