Fixed dockerfile
This commit is contained in:
+6
-2
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user