19 lines
751 B
Makefile
19 lines
751 B
Makefile
##@ [Application: Setup]
|
|
|
|
.PHONY: setup
|
|
setup: ## Setup the application
|
|
"$(MAKE)" composer ARGS="--working-dir=/application/src/new install"
|
|
"$(MAKE)" setup-db
|
|
|
|
.PHONY: setup-db
|
|
setup-db: ## Setup the DB tables
|
|
$(DOCKER_COMPOSE) cp ./.setup $(DOCKER_SERVICE_NAME_PHP_MYSQL):/setup
|
|
$(DOCKER_COMPOSE) exec -T $(DOCKER_SERVICE_NAME_PHP_MYSQL) bash -c 'mysql --password=$$MYSQL_ROOT_PASSWORD psc < /setup/mysql/backup.sql'
|
|
$(DOCKER_COMPOSE) cp ./.setup $(DOCKER_SERVICE_NAME_PHP_MONGODB):/setup
|
|
$(DOCKER_COMPOSE) exec -T $(DOCKER_SERVICE_NAME_PHP_MONGODB) bash -c 'mongorestore /setup/mongodb/'
|
|
|
|
.PHONY: composer
|
|
composer: ## Run composer commands. Specify the command e.g. via ARGS="install"
|
|
$(EXECUTE_IN_APPLICATION_CONTAINER) composer $(ARGS);
|
|
|