Fixed dockerfile

This commit is contained in:
2022-07-31 00:31:34 +02:00
parent cb76d0cdf2
commit 45d41d714b
4 changed files with 17 additions and 4 deletions
+6 -2
View File
@@ -27,16 +27,20 @@ func loadEnv(target *string, name, defaultValue string) {
} else {
*target = value
}
log.Printf("%s = %v", name, *target)
}
func Load() {
godotenv.Load()
if err := godotenv.Load(); err != nil {
panic(err)
}
log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
// Production
loadEnv(&Mode, "MODE", "production")
loadEnv(&Host, "HOST", "localhost:8080")
loadEnv(&Host, "HOST", ":8080")
// Services
loadEnv(&GitUrl, "GIT_URL", "https://git.example.org")