-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (33 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
DOCKER_PHP = php
help: ## Show this help menu
@echo 'usage: make [target]'
@echo
@echo 'targets:'
@egrep '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#'
build: ## Create docker build containers
docker-compose build
up: ## Start docker container
docker-compose up -d
down: ## Stop docker container
docker-compose down
ssh: ## Connect into php container
docker exec -it ${DOCKER_PHP} /bin/bash
composer-install: ## Run composer install inside container
docker exec -it ${DOCKER_PHP} composer install
composer-update: ## Run composer update inside container
docker exec -it ${DOCKER_PHP} composer update
migrate: ## Run Laravel migrations
docker exec -it ${DOCKER_PHP} php artisan migrate --no-interaction
seed: ## Run Laravel seeders
docker exec -it ${DOCKER_PHP} php artisan db:seed
test: ## Run Laravel phpunit tests
docker exec -it ${DOCKER_PHP} php artisan test
install: ## Setup local environment
cp .env.example .env
$(MAKE) build
$(MAKE) up
$(MAKE) composer-install
docker exec -it ${DOCKER_PHP} php artisan key:generate
$(MAKE) migrate
$(MAKE) seed