-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathmakefile
More file actions
50 lines (47 loc) · 1.58 KB
/
makefile
File metadata and controls
50 lines (47 loc) · 1.58 KB
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
46
47
48
49
50
include .env
pink:=$(shell tput setaf 200)
blue:=$(shell tput setaf 27)
green:=$(shell tput setaf 118)
violet:=$(shell tput setaf 057)
reset:=$(shell tput sgr0)
ifeq ($(shell uname),Darwin)
os=darwin
else
os=linux
endif
install:
$(info $(pink)------------------------------------------------------)
$(info $(pink)Make ($(os)): Installing $(APP_NAME)...)
$(info $(pink)------------------------------------------------------$(reset))
@docker-compose build
@docker-compose up -d
@docker exec $(DOCKER_PROJECT_CODE)_php composer install -vvv
@docker exec $(DOCKER_PROJECT_CODE)_php php artisan migrate
@docker exec $(DOCKER_PROJECT_CODE)_php php artisan db:seed
@docker exec $(DOCKER_PROJECT_CODE)_php php artisan passport:install
@docker exec $(DOCKER_PROJECT_CODE)_php php artisan sync:countries
@docker-compose down
@make -s start
update:
$(info $(pink)------------------------------------------------------)
$(info $(pink)Make ($(os)): Updating $(APP_NAME)...)
$(info $(pink)------------------------------------------------------$(reset))
@docker-compose down
@docker-compose build
@docker-compose up -d
@docker-compose down
@make -s start
start:
$(info $(pink) Make ($(os)): Starting $(APP_NAME).)
@docker-compose up -d
@docker exec -it $(DOCKER_PROJECT_CODE)_php service cron start
stop:
$(info $(pink) Make ($(os)): Stopping $(APP_NAME).)
@docker-compose down
restart:
$(info $(pink)Make ($(os)): Restarting $(APP_NAME).)
@make -s stop
@make -s start
console:
$(info $(pink)Make ($(os)): Starting Console for $(APP_NAME).)
@docker exec -it $(DOCKER_PROJECT_CODE)_php /bin/bash