Skip to content

Commit

Permalink
Change db user to admin user for #9
Browse files Browse the repository at this point in the history
Because occured db access denied.
  • Loading branch information
namikingsoft committed Mar 15, 2016
1 parent 787b6cb commit 6f63d86
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docker-entrypoint.sh
Expand Up @@ -6,7 +6,7 @@ if [ "$1" = 'start' ]; then
# config
sed -i "s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', 'restyaboard');/g" \
/usr/share/nginx/html/server/php/config.inc.php
sed -i "s/^.*'R_DB_USER'.*$/define('R_DB_USER', 'restya');/g" \
sed -i "s/^.*'R_DB_USER'.*$/define('R_DB_USER', '${POSTGRES_ENV_POSTGRES_USER}');/g" \
/usr/share/nginx/html/server/php/config.inc.php
sed -i "s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_ENV_POSTGRES_PASSWORD}');/g" \
/usr/share/nginx/html/server/php/config.inc.php
Expand Down Expand Up @@ -43,8 +43,7 @@ if [ "$1" = 'start' ]; then
fi
sleep 1
done
psql -c "CREATE USER restya WITH ENCRYPTED PASSWORD '${PGPASSWORD}'"
psql -c "CREATE DATABASE restyaboard OWNER restya ENCODING 'UTF8'"
psql -c "CREATE DATABASE restyaboard ENCODING 'UTF8'"
if [ "$?" = 0 ]; then
psql -d restyaboard -f /usr/share/nginx/html/sql/restyaboard_with_empty_data.sql
fi
Expand Down

0 comments on commit 6f63d86

Please sign in to comment.