Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config] support env variables for AUDIT_TRANSPORT_URL and DATABASE_CONNECTION #722

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ func parseConfigFlags(flags []string) error {
log.Info("Sentry is enabled")
}

// Set transport URL from env if not set in config file
if Global.Audit.TransportURL == "" {
Global.Audit.TransportURL = os.Getenv("AUDIT_TRANSPORT_URL")
}

// Set Database Connection URL from env if not set in config file
if Global.Database.Connection == "" {
Global.Database.Connection = os.Getenv("DATABASE_CONNECTION")
}

return nil
}

Expand Down
Loading