chore: build
ci-api / test (push) Successful in 26m45s

This commit is contained in:
Xor290
2026-08-17 19:34:14 +02:00
parent d23d2cbe37
commit 02a5edd1b7
2 changed files with 169 additions and 21 deletions
+23 -15
View File
@@ -22,6 +22,12 @@ type Config struct {
BackendImage string
LBTelegramImage string
AppDownloadsDir string // OMNEX_APP_DOWNLOADS_DIR : répertoire des .apk téléchargeables (voir internal/downloads)
// DockerHubUsername/Password : compte Docker Hub authentifié (droits
// lecture seule) injecté dans chaque namespace de démo (voir
// deploy/chart-gestion/registry-credentials) pour passer le rate-limit
// de pull anonyme (100/6h par IP) à 200/6h. "" = pull anonyme (défaut).
DockerHubUsername string
DockerHubPassword string
}
// Load lit la config. Fail-secure : secret JWT obligatoire ; en prod base + Redis aussi.
@@ -32,21 +38,23 @@ func Load() (Config, error) {
}
cfg := Config{
Addr: getenv("OMNEX_ADDR", ":8080"),
JWTSecret: []byte(secret),
SessionTTL: 24 * time.Hour,
AllowedOrigins: splitCSV(getenv("OMNEX_ALLOWED_ORIGINS", "http://localhost:5173")),
Env: getenv("OMNEX_ENV", "dev"),
DatabaseURL: os.Getenv("OMNEX_DATABASE_URL"),
RedisURL: os.Getenv("OMNEX_REDIS_URL"),
DemoDomain: getenv("OMNEX_DEMO_DOMAIN", "demo.omnex.app"),
DemoHTTPSPort: getenv("OMNEX_DEMO_HTTPS_PORT", "443"),
RegistrationCode: os.Getenv("OMNEX_REGISTRATION_CODE"),
Kubeconfig: os.Getenv("KUBECONFIG"),
FrontendImage: os.Getenv("FRONTEND_IMAGE_APP"),
BackendImage: os.Getenv("BACKEND_IMAGE_APP"),
LBTelegramImage: os.Getenv("LBTELEGRAM_IMAGE_APP"),
AppDownloadsDir: getenv("OMNEX_APP_DOWNLOADS_DIR", "/app-downloads"),
Addr: getenv("OMNEX_ADDR", ":8080"),
JWTSecret: []byte(secret),
SessionTTL: 24 * time.Hour,
AllowedOrigins: splitCSV(getenv("OMNEX_ALLOWED_ORIGINS", "http://localhost:5173")),
Env: getenv("OMNEX_ENV", "dev"),
DatabaseURL: os.Getenv("OMNEX_DATABASE_URL"),
RedisURL: os.Getenv("OMNEX_REDIS_URL"),
DemoDomain: getenv("OMNEX_DEMO_DOMAIN", "demo.omnex.app"),
DemoHTTPSPort: getenv("OMNEX_DEMO_HTTPS_PORT", "443"),
RegistrationCode: os.Getenv("OMNEX_REGISTRATION_CODE"),
Kubeconfig: os.Getenv("KUBECONFIG"),
FrontendImage: os.Getenv("FRONTEND_IMAGE_APP"),
BackendImage: os.Getenv("BACKEND_IMAGE_APP"),
LBTelegramImage: os.Getenv("LBTELEGRAM_IMAGE_APP"),
AppDownloadsDir: getenv("OMNEX_APP_DOWNLOADS_DIR", "/app-downloads"),
DockerHubUsername: os.Getenv("OMNEX_DOCKERHUB_USERNAME"),
DockerHubPassword: os.Getenv("OMNEX_DOCKERHUB_PASSWORD"),
}
if cfg.Env == "prod" {