Skip to content

Commit

Permalink
Use secrets for password management
Browse files Browse the repository at this point in the history
  • Loading branch information
kahgoh committed Jun 26, 2024
1 parent 72f5ea9 commit 5fc8c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/01-users.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER lotto WITH ENCRYPTED PASSWORD '${LOTTO_USER_PWD}';
CREATE USER lotto WITH ENCRYPTED PASSWORD '$(< /run/secrets/${LOTTO_USER_PWD_SECRET} )';
GRANT ALL PRIVILEGES ON DATABASE lotto TO lotto;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO lotto;
GRANT USAGE ON SCHEMA public TO lotto;
Expand Down

0 comments on commit 5fc8c4d

Please sign in to comment.