File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ package main
33import (
44 "flag"
55 "net/http"
6+ "os"
67 "path/filepath"
78 "runtime"
9+ "strings"
810 "time"
911
1012 jsoniter "github.com/json-iterator/go"
@@ -60,7 +62,17 @@ const infoDirectory = "./static/bidder-info"
6062
6163func loadConfig (bidderInfos config.BidderInfos ) (* config.Configuration , error ) {
6264 v := viper .New ()
63- config .SetupViper (v , configFileName , bidderInfos )
65+ mspConfigFileName := configFileName
66+ envVar := strings .ToLower (os .Getenv ("MSP_RUN_MODE" ))
67+
68+ switch envVar {
69+ case "mspai_staging" :
70+ mspConfigFileName = "./msp_config/mspai-stage"
71+ case "mspai_prod" :
72+ mspConfigFileName = "./msp_config/mspai-prod"
73+ }
74+
75+ config .SetupViper (v , mspConfigFileName , bidderInfos )
6476 return config .New (v , bidderInfos , openrtb_ext .NormalizeBidderName )
6577}
6678
You can’t perform that action at this time.
0 commit comments