generate random password by default on postgres password

This commit is contained in:
Sofyan Sugianto 2020-08-27 16:09:42 +07:00
parent 13044fb997
commit ef32b623b3
2 changed files with 3 additions and 2 deletions

View File

@ -311,8 +311,7 @@ HELP_URL=https://docs.bigbluebutton.org/greenlight/gl-overview.html
# approval - For approve/decline registration
DEFAULT_REGISTRATION=open
# Specify database for Greenlight.
# please change POSTGRES_PASSWORD with your secure password
# Specify postgresql database credentials to be used by Greenlight.
POSTGRES_DB=greenlight
POSTGRES_USER=postgres
POSTGRES_PASSWORD=verysecurepassword

View File

@ -116,9 +116,11 @@ fi
RANDOM_1=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40)
RANDOM_2=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 40)
RANDOM_3=$(head /dev/urandom | tr -dc a-f0-9 | head -c 128)
RANDOM_4=$(head /dev/urandom | tr -dc A-Za-z0-9_@ | head -c 24)
sed -i "s/SHARED_SECRET=.*/SHARED_SECRET=$RANDOM_1/" .env
sed -i "s/ETHERPAD_API_KEY=.*/ETHERPAD_API_KEY=$RANDOM_2/" .env
sed -i "s/RAILS_SECRET=.*/RAILS_SECRET=$RANDOM_3/" .env
sed -i "s/POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=$RANDOM_3/" .env
echo "--------------------------------------------------"
echo "configuration file .env got successfully created!"