Better DB pass (#5313)
This commit is contained in:
parent
3e47e39633
commit
e343c7b5aa
@ -26,7 +26,7 @@ PG_VERSION="16" setup_postgresql
|
|||||||
msg_info "Setting up PostgreSQL Database"
|
msg_info "Setting up PostgreSQL Database"
|
||||||
DB_NAME=planka
|
DB_NAME=planka
|
||||||
DB_USER=planka
|
DB_USER=planka
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
DB_PASS=$(openssl rand -base64 16 | tr -d '/+=')
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user