forked from mtusi2026/mtusi2026lab7
lab7
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
for role in api worker dispatcher reconciler; do
|
||||
LAB_ROLE_PASSWORD="$(cat "/credentials/$role")" \
|
||||
psql -q -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
|
||||
-v role="lab_$role" <<'SQL'
|
||||
\getenv pw LAB_ROLE_PASSWORD
|
||||
CREATE ROLE :"role" LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION PASSWORD :'pw';
|
||||
SQL
|
||||
done
|
||||
Reference in New Issue
Block a user