Repository: minio/minio (language: go)

Issue:
Minio console-address configuration via env vars
The change to the use of the command-line parameter ```--console-address``` requires the use of the ```command``` parameter in docker/docker-compose.

I would consider it better if that parameter could be supplied via an env var so that the ```command``` doesn't need to be overwritten.

Lines 396-420 in ```common-main.go``` concern themselves with setting the ```globalMinioConsoleHost``` and ```globalMinoConsolePort```.

From what I can tell the same logic could be introduced into function ```handleCommonEnvVars``` to perform the same but with env vars as the source e.g. ```MINIO_CONSOLE_HOST``` and ```MINIO_CONSOLE_PORT```.

I'm happy to have a stab at a PR if this is something the community would like.


Discussion / hints:

Fix patch:
diff --git a/cmd/server-main.go b/cmd/server-main.go
index e94010859aa32..b1d55ee81c727 100644
--- a/cmd/server-main.go
+++ b/cmd/server-main.go
@@ -51,23 +51,27 @@ import (
 // ServerFlags - server command specific flags
 var ServerFlags = []cli.Flag{
 	cli.StringFlag{
-		Name:  "address",
-		Value: ":" + GlobalMinioDefaultPort,
-		Usage: "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname",
+		Name:   "address",
+		Value:  ":" + GlobalMinioDefaultPort,
+		Usage:  "bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname",
+		EnvVar: "MINIO_ADDRESS",
 	},
 	cli.IntFlag{
-		Name:  "listeners",
-		Value: 1,
-		Usage: "bind N number of listeners per ADDRESS:PORT",
+		Name:   "listeners",
+		Value:  1,
+		Usage:  "bind N number of listeners per ADDRESS:PORT",
+		EnvVar: "MINIO_LISTENERS",
 	},
 	cli.StringFlag{
-		Name:  "console-address",
-		Usage: "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
+		Name:   "console-address",
+		Usage:  "bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname",
+		EnvVar: "MINIO_CONSOLE_ADDRESS",
 	},
 	cli.DurationFlag{
 		Name:   "shutdown-timeout",
 		Value:  xhttp.DefaultShutdownTimeout,
 		Usage:  "shutdown timeout to gracefully shutdown server",
+		EnvVar: "MINIO_SHUTDOWN_TIMEOUT",
 		Hidden: true,
 	},
 }


Test patch: