From b1d85fd908d2e5e12590ce38d1371d89b5e7419e Mon Sep 17 00:00:00 2001 From: Maxi Redigonda Date: Tue, 31 May 2022 13:38:37 -0300 Subject: [PATCH] [DEV-190] Mount folder with instructions on how to initialize --- server/.start-db/init-db.sh | 1 + server/Makefile | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 server/.start-db/init-db.sh diff --git a/server/.start-db/init-db.sh b/server/.start-db/init-db.sh new file mode 100644 index 00000000..7c2b510c --- /dev/null +++ b/server/.start-db/init-db.sh @@ -0,0 +1 @@ +mysql -u root -e "CREATE DATABASE IF NOT EXISTS development;" diff --git a/server/Makefile b/server/Makefile index 17aa86a7..9708c5ae 100644 --- a/server/Makefile +++ b/server/Makefile @@ -14,11 +14,11 @@ install: @docker exec -u root -it opensupports-db bash -c "mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}" install-not-interactive: - echo "${yellow}About to run COMPOSER INSTALL${reset}" + # echo "${yellow}About to run COMPOSER INSTALL${reset}" docker exec opensupports-srv bash -c "cd /var/www/html && composer install" || echo "${red}Please execute 'make run' first${reset}" - echo "${yellow}About to run CREATE DATABASE IF NOT EXISTS${reset}" - docker exec -u root opensupports-db bash -c "/etc/init.d/mysql status; /etc/init.d/mysql start; mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}" - echo "${yellow}About to FINISH INSTALL-NOT-INTERACTIVE${reset}" + # echo "${yellow}About to run CREATE DATABASE IF NOT EXISTS${reset}" + # docker exec -u root opensupports-db bash -c "/etc/init.d/mysql status; /etc/init.d/mysql start; mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}" + # echo "${yellow}About to FINISH INSTALL-NOT-INTERACTIVE${reset}" setup-vendor-permissions: @docker exec opensupports-srv bash -c "cd /var/www/html && chmod 777 -R vendor/ezyang" || echo "${red}Please execute 'make run' first${reset}"