Add database creation on install

This commit is contained in:
Ivan Diaz 2018-03-29 16:38:00 -03:00
parent accc5ba7ae
commit b8740f3aaa
1 changed files with 3 additions and 0 deletions

View File

@ -4,10 +4,13 @@ reset=`tput sgr0`
build:
@docker pull mysql
@docker pull phpmyadmin/phpmyadmin
@docker pull munkyboy/fakesmtp
@docker build -t opensupports-srv . || echo "A${red}An error occurred${reset}"
install:
@docker exec -it opensupports-srv bash -c "cd /var/www/html && composer install" || echo "${red}Please execute 'make run' first${reset}"
@docker exec -it opensupports-db bash -c "mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}"
run:
@docker run -d --name opensupports-db -p 4040:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -v $(PWD)/.dbdata/:/var/lib/mysql mysql