feat(env): Added production and development environment
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m44s

This commit is contained in:
2026-05-04 00:33:18 +03:00
parent fbeff3f6c0
commit bcdcce8fbd
7 changed files with 42 additions and 0 deletions

View File

@@ -236,6 +236,7 @@ func clearAdminSettingsEnv(t *testing.T) {
"WARPBOX_ADMIN_PASSWORD",
"WARPBOX_ADMIN_USERNAME",
"WARPBOX_ADMIN_EMAIL",
"WARPBOX_ENV",
"WARPBOX_ADMIN_ENABLED",
"WARPBOX_ALLOW_ADMIN_SETTINGS_OVERRIDE",
"WARPBOX_ADMIN_COOKIE_SECURE",

View File

@@ -30,6 +30,12 @@ func Run(addr string) error {
if err != nil {
return err
}
switch cfg.Environment {
case config.AppEnvironmentProduction:
gin.SetMode(gin.ReleaseMode)
default:
gin.SetMode(gin.DebugMode)
}
if err := cfg.EnsureDirectories(); err != nil {
return err
}