diff --git a/entrypoint.sh b/entrypoint.sh index ce3d439..eb311c4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,9 +7,9 @@ service mysql start echo "[ INFO ] Starting PHP 7.2 Service" service php7.2-fpm start -# Running friendBook database setup script -echo "[ INFO ] Setting up friendBook database" -mysql -u root < /scripts/friendBook.sql +# Running friendbook database setup script +echo "[ INFO ] Setting up friendbook database" +mysql -u root < /scripts/friendbook.sql echo "[ INFO ] Starting nginx" nginx -g "daemon off;" # Foreground diff --git a/scripts/friendBook.sql b/scripts/friendBook.sql index 3ff39fc..98d7cb3 100644 --- a/scripts/friendBook.sql +++ b/scripts/friendBook.sql @@ -1,4 +1,4 @@ -USE friendBook; +USE friendbook; CREATE TABLE login( username varchar(25), diff --git a/scripts/mysql_setup.sh b/scripts/mysql_setup.sh index 464a4fa..b87c5e1 100644 --- a/scripts/mysql_setup.sh +++ b/scripts/mysql_setup.sh @@ -13,7 +13,7 @@ EOF # Setting up the basics mysql -u root << EOF CREATE USER 'web'@'localhost' IDENTIFIED BY 'Password456'; -CREATE DATABASE friendBook; -GRANT ALL PRIVILEGES ON friendBook . * TO 'web'@'localhost'; +CREATE DATABASE friendbook; +GRANT ALL PRIVILEGES ON friendbook . * TO 'web'@'localhost'; FLUSH PRIVILEGES; EOF \ No newline at end of file diff --git a/var/www/common.php b/var/www/common.php new file mode 100644 index 0000000..81a3a42 --- /dev/null +++ b/var/www/common.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/var/www/db_connection.php b/var/www/db_connection.php index 1b1bea8..9adce42 100644 --- a/var/www/db_connection.php +++ b/var/www/db_connection.php @@ -1,6 +1,6 @@
-