From 3033dcf1a9fd9cb845e2e605fcfbd0a2d10f71a7 Mon Sep 17 00:00:00 2001 From: Vikram Rangnekar Date: Wed, 4 Mar 2020 15:39:53 +0530 Subject: [PATCH] Fix issue with setting PORT env var --- Dockerfile | 4 +--- scripts/start.sh | 2 +- serv/config.go | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b431e1..e91aa62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,5 @@ RUN chmod +x /start.sh USER nobody -EXPOSE 8080 - -CMD ./super-graph serv ENTRYPOINT ["./start.sh"] +CMD ./super-graph serv diff --git a/scripts/start.sh b/scripts/start.sh index d64e1c0..9c4f1eb 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,7 +1,7 @@ #!/bin/sh if [ $1 = "secrets" ] then - sops --config ./config "${@:2}" + ./sops --config ./config "${@:2}" exit 0 fi diff --git a/serv/config.go b/serv/config.go index 2c6a716..b31be6c 100644 --- a/serv/config.go +++ b/serv/config.go @@ -205,8 +205,8 @@ func newConfig(name string) *viper.Viper { vi.SetDefault("env", "development") vi.BindEnv("env", "GO_ENV") //nolint: errcheck - vi.BindEnv("HOST", "HOST") //nolint: errcheck - vi.BindEnv("PORT", "PORT") //nolint: errcheck + vi.BindEnv("host", "HOST") //nolint: errcheck + vi.BindEnv("port", "PORT") //nolint: errcheck vi.SetDefault("auth.rails.max_idle", 80) vi.SetDefault("auth.rails.max_active", 12000)