Skip to content

Commit

Permalink
Fix .env generation
Browse files Browse the repository at this point in the history
  • Loading branch information
k-burt-uch committed Oct 21, 2024
1 parent 0f37109 commit e7d1cab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gen3/bin/kube-setup-gen3-user-data-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ setup_database() {

# go ahead and rotate the password whenever we regen this file
local password="$(gen3 random)"
local db_host=$(jq -r .db_host < "$secretsFolder/dbcreds.json")
local db_user=$(jq -r .db_username < "$secretsFolder/dbcreds.json")
local db_password=$(jq -r .db_password < "$secretsFolder/dbcreds.json")
local db_database=$(jq -r .db_database < "$secretsFolder/dbcreds.json")
cat - > "$secretsFolder/gen3-user-data-library.env" <<EOM
DEBUG=0
DB_HOST=$(jq -r .db_host < "$secretsFolder/dbcreds.json")
DB_USER=$(jq -r .db_username < "$secretsFolder/dbcreds.json")
DB_PASSWORD=$(jq -r .db_password < "$secretsFolder/dbcreds.json")
DB_DATABASE=$(jq -r .db_database < "$secretsFolder/dbcreds.json")
ADMIN_LOGINS=gateway:$password
DB_CONNECTION_STRING=postgresql+asyncpg://$db_user:$db_password@$db_host/$db_database
ENABLE_PROMETHEUS_METRICS=False
EOM
# make it easy for nginx to get the Authorization header ...
echo -n "gateway:$password" | base64 > "$secretsFolder/base64Authz.txt"
Expand Down

0 comments on commit e7d1cab

Please sign in to comment.