|
@ -20,7 +20,7 @@ read -p 'Enter host (vm) port on which postgres should be accessible: ' POSTGRES |
|
|
read -p 'Enter admin user name for postgres: ' POSTGRES_ADMIN_USER |
|
|
read -p 'Enter admin user name for postgres: ' POSTGRES_ADMIN_USER |
|
|
read -p 'Enter admin password for postgres: ' POSTGRES_ADMIN_PASSWORD |
|
|
read -p 'Enter admin password for postgres: ' POSTGRES_ADMIN_PASSWORD |
|
|
|
|
|
|
|
|
read -p 'Would you like to modify postgres rights for shared hosting? (Y/n)' POSTGRES_SHARED_HOSTING |
|
|
|
|
|
|
|
|
read -p 'Would you like to modify postgres rights for shared hosting? (y/n)' POSTGRES_SHARED_HOSTING |
|
|
|
|
|
|
|
|
touch .env |
|
|
touch .env |
|
|
echo "POSTGRES_VERSION="$POSTGRES_VERSION >> .env |
|
|
echo "POSTGRES_VERSION="$POSTGRES_VERSION >> .env |
|
@ -31,6 +31,8 @@ echo "POSTGRES_ADMIN_PASSWORD="$POSTGRES_ADMIN_PASSWORD >> .env |
|
|
|
|
|
|
|
|
docker-compose up -d |
|
|
docker-compose up -d |
|
|
|
|
|
|
|
|
|
|
|
echo 'Wait a few seconds ...' |
|
|
|
|
|
|
|
|
sleep 5 |
|
|
sleep 5 |
|
|
|
|
|
|
|
|
if [ $POSTGRES_SHARED_HOSTING == 'y' ]; then |
|
|
if [ $POSTGRES_SHARED_HOSTING == 'y' ]; then |
|
@ -50,3 +52,6 @@ if [ $POSTGRES_SHARED_HOSTING == 'y' ]; then |
|
|
cat tmp | docker exec -i postgres psql -U $POSTGRES_ADMIN_USER -d template1 |
|
|
cat tmp | docker exec -i postgres psql -U $POSTGRES_ADMIN_USER -d template1 |
|
|
|
|
|
|
|
|
rm -f tmp |
|
|
rm -f tmp |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo 'Done!' |