Commit 6f63d862 by Tsubasa Namiki

Change db user to admin user for #9

Because occured db access denied.
parent 787b6cbf
...@@ -6,7 +6,7 @@ if [ "$1" = 'start' ]; then ...@@ -6,7 +6,7 @@ if [ "$1" = 'start' ]; then
# config # config
sed -i "s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', 'restyaboard');/g" \ sed -i "s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', 'restyaboard');/g" \
/usr/share/nginx/html/server/php/config.inc.php /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 /usr/share/nginx/html/server/php/config.inc.php
sed -i "s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_ENV_POSTGRES_PASSWORD}');/g" \ sed -i "s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '${POSTGRES_ENV_POSTGRES_PASSWORD}');/g" \
/usr/share/nginx/html/server/php/config.inc.php /usr/share/nginx/html/server/php/config.inc.php
...@@ -43,8 +43,7 @@ if [ "$1" = 'start' ]; then ...@@ -43,8 +43,7 @@ if [ "$1" = 'start' ]; then
fi fi
sleep 1 sleep 1
done done
psql -c "CREATE USER restya WITH ENCRYPTED PASSWORD '${PGPASSWORD}'" psql -c "CREATE DATABASE restyaboard ENCODING 'UTF8'"
psql -c "CREATE DATABASE restyaboard OWNER restya ENCODING 'UTF8'"
if [ "$?" = 0 ]; then if [ "$?" = 0 ]; then
psql -d restyaboard -f /usr/share/nginx/html/sql/restyaboard_with_empty_data.sql psql -d restyaboard -f /usr/share/nginx/html/sql/restyaboard_with_empty_data.sql
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment