From b71f1885ec789da7172e27271e34287ea56767cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sat, 17 Jun 2023 23:40:46 +0200 Subject: [PATCH] Fix wrongly named env variables --- scnserver/Makefile | 4 ++-- scnserver/config.go | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scnserver/Makefile b/scnserver/Makefile index 11f7486..977d187 100644 --- a/scnserver/Makefile +++ b/scnserver/Makefile @@ -5,7 +5,7 @@ PORT=9090 NAMESPACE=$(shell git rev-parse --abbrev-ref HEAD) HASH=$(shell git rev-parse HEAD) -.PHONY: test swagger pygmentize docker migrate dgi pygmentize lint +.PHONY: test swagger pygmentize docker migrate dgi pygmentize lint docker build: swagger pygmentize fmt mkdir -p _build @@ -29,7 +29,7 @@ dgi: echo -n "COMMITTIME=" >> DOCKER_GIT_INFO ; git log -1 --format=%cd --date=iso >> DOCKER_GIT_INFO echo -n "REMOTE=" >> DOCKER_GIT_INFO ; git config --get remote.origin.url >> DOCKER_GIT_INFO -build-docker: dgi +docker: dgi docker build \ -t "$(DOCKER_NAME):$(HASH)" \ -t "$(DOCKER_NAME):$(NAMESPACE)-latest" \ diff --git a/scnserver/config.go b/scnserver/config.go index ff2444b..06770e8 100644 --- a/scnserver/config.go +++ b/scnserver/config.go @@ -398,17 +398,17 @@ var configProd = func() Config { ReturnRawErrors: false, DummyFirebase: false, FirebaseTokenURI: "https://oauth2.googleapis.com/token", - FirebaseProjectID: confEnv("SCN_SCN_FB_PROJECTID"), - FirebasePrivKeyID: confEnv("SCN_SCN_FB_PRIVATEKEYID"), - FirebaseClientMail: confEnv("SCN_SCN_FB_CLIENTEMAIL"), - FirebasePrivateKey: confEnv("SCN_SCN_FB_PRIVATEKEY"), + FirebaseProjectID: confEnv("SCN_FB_PROJECTID"), + FirebasePrivKeyID: confEnv("SCN_FB_PRIVATEKEYID"), + FirebaseClientMail: confEnv("SCN_FB_CLIENTEMAIL"), + FirebasePrivateKey: confEnv("SCN_FB_PRIVATEKEY"), DummyGoogleAPI: false, GoogleAPITokenURI: "https://oauth2.googleapis.com/token", - GoogleAPIPrivKeyID: confEnv("SCN_SCN_GOOG_PRIVATEKEYID"), - GoogleAPIClientMail: confEnv("SCN_SCN_GOOG_CLIENTEMAIL"), - GoogleAPIPrivateKey: confEnv("SCN_SCN_GOOG_PRIVATEKEY"), - GooglePackageName: confEnv("SCN_SCN_GOOG_PACKAGENAME"), - GoogleProProductID: confEnv("SCN_SCN_GOOG_PROPRODUCTID"), + GoogleAPIPrivKeyID: confEnv("SCN_GOOG_PRIVATEKEYID"), + GoogleAPIClientMail: confEnv("SCN_GOOG_CLIENTEMAIL"), + GoogleAPIPrivateKey: confEnv("SCN_GOOG_PRIVATEKEY"), + GooglePackageName: confEnv("SCN_GOOG_PACKAGENAME"), + GoogleProProductID: confEnv("SCN_GOOG_PROPRODUCTID"), Cors: true, ReqLogMaxBodySize: 2048, ReqLogHistoryMaxCount: 1638, @@ -449,7 +449,7 @@ func confEnv(key string) string { } func init() { - ns := os.Getenv("SCN_NAMESPACE") + ns := os.Getenv("CONF_NS") cfg, ok := GetConfig(ns) if !ok {