Skip to content

harden docker env loading and system fallback#115

Open
aaronkhall wants to merge 6 commits intoLumePart:devfrom
aaronkhall:fix/docker-env-loading
Open

harden docker env loading and system fallback#115
aaronkhall wants to merge 6 commits intoLumePart:devfrom
aaronkhall:fix/docker-env-loading

Conversation

@aaronkhall
Copy link

Summary

  • make config loading Docker-safe by attempting .env load with godotenv.Load and falling back to process environment when the file is missing
  • always bind configuration from process env after .env load, then normalize env-backed fields with strings.TrimSpace
  • add explicit system key fallback from EXPLO_SYSTEM to MUSIC_SYSTEM_TYPE, normalize to lowercase, and log resolved system at startup for easier diagnosis
  • add config tests covering env fallback precedence, whitespace trimming, and common-fix normalization behavior

Problem

In Docker runs, MUSIC_SYSTEM_TYPE / EXPLO_SYSTEM could resolve to an empty value, causing:
unknown system: ...

Test plan

  • go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant