diff options
author | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-24 01:09:58 -0400 |
---|---|---|
committer | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-24 01:09:58 -0400 |
commit | be98920271e9f1a8becb1dbf91be721380a81bb3 (patch) | |
tree | 682501f9238ef9cbc8581779a26d752556afc3b4 | |
parent | a88946bb7fcfc1632661eafc84eac0aa1c2573c3 (diff) | |
download | donetick-be98920271e9f1a8becb1dbf91be721380a81bb3.tar.gz donetick-be98920271e9f1a8becb1dbf91be721380a81bb3.tar.bz2 donetick-be98920271e9f1a8becb1dbf91be721380a81bb3.zip |
Update environment variable names in config and docker-compose
-rw-r--r-- | config/config.go | 8 | ||||
-rw-r--r-- | docker-compose.yaml | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/config/config.go b/config/config.go index b38e808..52ed1db 100644 --- a/config/config.go +++ b/config/config.go @@ -102,17 +102,17 @@ func configEnvironmentOverrides(Config *Config) { func LoadConfig() *Config { // set the config name based on the environment: - if os.Getenv("CA_ENV") == "local" { + if os.Getenv("DT_ENV") == "local" { viper.SetConfigName("local") - } else if os.Getenv("CA_ENV") == "prod" { + } else if os.Getenv("DT_ENV") == "prod" { viper.SetConfigName("prod") - } else if os.Getenv("CA_ENV") == "selfhosted" { + } else if os.Getenv("DT_ENV") == "selfhosted" { viper.SetConfigName("selfhosted") } else { viper.SetConfigName("local") } // get logger and log the current environment: - fmt.Printf("--ConfigLoad config for environment: %s ", os.Getenv("CA_ENV")) + fmt.Printf("--ConfigLoad config for environment: %s ", os.Getenv("DT_ENV")) viper.AddConfigPath("./config") viper.SetConfigType("yaml") diff --git a/docker-compose.yaml b/docker-compose.yaml index efaee3a..39bfd6e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -15,7 +15,7 @@ services: ports: - "8085:8000" environment: - - CA_ENV=prod + - DT_ENV=prod hostname: donetick-core command: ["/donetick-core"] # Command to execute your binary inside the container networks: |