fix: rename encoder temp directory environment variable and add default fallback path
Build / Build and Push (push) Successful in 14s

This commit is contained in:
2026-06-05 20:16:12 +01:00
parent 8308950637
commit a90af492ee
+4 -1
View File
@@ -82,7 +82,7 @@ func LoadConfig(path string) (*Config, error) {
cfg.Database.Password = getEnvStr("GOENCODE_DB_PASS", cfg.Database.Password)
cfg.Database.Name = getEnvStr("GOENCODE_DB_NAME", cfg.Database.Name)
cfg.Encoder.FFmpegPath = getEnvStr("GOENCODE_FFMPEG_PATH", cfg.Encoder.FFmpegPath)
cfg.Encoder.TempDir = getEnvStr("GOENCODE_TEMP_DIR", cfg.Encoder.TempDir)
cfg.Encoder.TempDir = getEnvStr("GOENCODE_ENCODER_TEMP", cfg.Encoder.TempDir)
cfg.Logging.Level = getEnvStr("GOENCODE_LOG_LEVEL", cfg.Logging.Level)
// Defaults if missing entirely
@@ -95,6 +95,9 @@ func LoadConfig(path string) (*Config, error) {
if cfg.Database.Port == 0 {
cfg.Database.Port = 3306
}
if cfg.Encoder.TempDir == "" {
cfg.Encoder.TempDir = "/tmp/goencode"
}
if envTZ := os.Getenv("TZ"); envTZ != "" {
cfg.Server.TimeZone = envTZ