This commit is contained in:
2024-06-01 16:00:14 -07:00
parent 8b2d298488
commit 635f2650e9
17 changed files with 283 additions and 40 deletions

View File

@@ -26,7 +26,7 @@ type ConfigParams struct {
}
type Config struct {
DBURL string
DBDSN string
Debug bool
MaintenanceMode bool
DevelopmentMode bool
@@ -59,7 +59,7 @@ func New(lc fx.Lifecycle, params ConfigParams) (*Config, error) {
viper.SetDefault("DEV_ADMIN_USERNAME", "")
viper.SetDefault("DEV_ADMIN_PASSWORD", "")
viper.SetDefault("PORT", "8080")
viper.SetDefault("DBURL", "")
viper.SetDefault("DB_DSN", "")
viper.SetDefault("SENTRY_DSN", "")
viper.SetDefault("METRICS_USERNAME", "")
viper.SetDefault("METRICS_PASSWORD", "")
@@ -76,7 +76,7 @@ func New(lc fx.Lifecycle, params ConfigParams) (*Config, error) {
}
s := &Config{
DBURL: viper.GetString("DBURL"),
DBDSN: viper.GetString("DB_DSN"),
Debug: viper.GetBool("debug"),
Port: viper.GetInt("PORT"),
SentryDSN: viper.GetString("SENTRY_DSN"),