From f77c3b13665648625bc3e501c5b3e41139e59e2e Mon Sep 17 00:00:00 2001 From: Daniil_Gorpinchenko Date: Fri, 27 Sep 2024 11:06:46 +0300 Subject: [PATCH] rm redundant cfg value --- .github/workflows/blank.yml | 3 +-- internal/config/app.go | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 2682929..cfc6f8f 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -102,8 +102,7 @@ jobs: echo -e "[Service]\n\ Environment=\"JWT_SECRET_KEY=${{ secrets.JWT_SECRET_KEY }}\"\n\ Environment=\"EMAIL_PASSWORD=${{ secrets.EMAIL_PASSWORD }}\"\n\ - Environment=\"DB_USER=${{ secrets.DB_USER }}\"\n\ - Environment=\"DB_PASSWORD=${{ secrets.DB_PASSWORD }}\"" > override.conf + Environment=\"DB_USER=${{ secrets.DB_USER }}\"" > override.conf sudo mv override.conf /etc/systemd/system/stage.csr.service.d/override.conf sudo chown root:root /etc/systemd/system/stage.csr.service.d/override.conf sudo chmod 644 /etc/systemd/system/stage.csr.service.d/override.conf diff --git a/internal/config/app.go b/internal/config/app.go index 986c787..4b09865 100644 --- a/internal/config/app.go +++ b/internal/config/app.go @@ -105,8 +105,7 @@ func getDefaultConfig() *AppConfig { DB: DB{ Host: "localhost", User: "csr", - Password: "password", - Database: "csr", + Database: "stage_csr", }, Password: Password{ Length: 8, @@ -128,7 +127,6 @@ func bindEnvVars() { viper.BindEnv("jwtsecretkey", "JWT_SECRET_KEY") viper.BindEnv("email.password", "EMAIL_PASSWORD") viper.BindEnv("db.user", "DB_USER") - viper.BindEnv("db.password", "DB_PASSWORD") viper.AutomaticEnv() }