Introduce AgentOptions class with DataAnnotations validation bound from configuration (env vars with Agent__ prefix). Replace all Environment.GetEnvironmentVariable() calls with typed IOptions<T> injection. Config errors are caught at startup via ValidateOnStart().
32 lines
992 B
Bash
32 lines
992 B
Bash
# ─── Heimdall — Environment Variables ──────────────────────────────
|
|
# Copy this file to .env and adjust for your deployment
|
|
|
|
# Database
|
|
DATABASE_URL=Host=postgresql;Port=5432;Database=heimdall;Username=heimdall;Password=heimdall
|
|
|
|
# JWT (change in production!)
|
|
JWT__KEY=ChangeMeToAtLeast32BytesLongKeyInProd!
|
|
JWT__ISSUER=heimdall
|
|
JWT__AUDIENCE=heimdall-api
|
|
|
|
# ASP.NET
|
|
ASPNETCORE_ENVIRONMENT=Production
|
|
ASPNETCORE_URLS=http://+:8080
|
|
|
|
# CORS
|
|
Cors__AllowedOrigins=https://localhost:5001,http://localhost:5000
|
|
|
|
# Alarik (S3-compatible object storage)
|
|
ALARIK_API_PORT=9000
|
|
ALARIK_CONSOLE_PORT=9001
|
|
ALARIK_ADMIN_USERNAME=heimdall
|
|
ALARIK_ADMIN_PASSWORD=heimdall123
|
|
ALARIK_JWT=ChangeMeAtLeast32BytesLongKeyInProd!
|
|
|
|
# Agent (set per agent instance)
|
|
Agent__CentralUrl=http://heimdall-central:8080
|
|
Agent__SiteToken=replace-with-actual-token
|
|
Agent__AgentName=agent-01
|
|
Agent__HeartbeatIntervalSeconds=30
|
|
Agent__RegistrationMaxRetries=5
|