-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
65 lines (52 loc) · 1.95 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
all:
@echo
@echo "Web : Description"
@echo "-------------- : ------------------"
@echo "make composer : Download the composer.phar into current directory"
@echo "make vendor : Download the required packages into vendor directory"
@echo "make server : Run the dev server"
@echo "make migration : Install the migration table to related database"
@echo
@echo "Docker : Description"
@echo "--------------------------------- : -----------------"
@echo "make docker-start : Start the docker service"
@echo "make docker-stop : Stop the docker service"
@echo "make docker-clean-tmp : Clean the tmp data"
@echo "make docker-clean-mysql : Clean the mysql data"
@echo "make docker-remove-containers : Remove slimork only docker containers"
@echo "make docker-remove-all-containers : Remove all docker containers"
@echo "make docker-remove-all-images : Remove all docker images"
@echo "make docker-refresh : Remove the containers and images, then re-start the docker compose"
@echo
composer:
@rm -rf composer.phar
@curl https://getcomposer.org/composer.phar -o composer.phar
vendor:
@php composer.phar install
server:
@php -S localhost:8080 -t ./public
migration:
@php ./vendor/bin/phinx migrate
docker-start:
@bash ./docker/scripts.sh start
docker-stop:
@bash ./docker/scripts.sh stop
@make docker-clean
docker-clean:
@make docker-clean-tmp
docker-clean-tmp:
@rm -rf ./docker/tmp/php/xdebug
docker-clean-mysql:
@rm -rf ./docker/var/mysql/data
docker-remove-containers:
@bash ./docker/scripts.sh remove-containers
docker-remove-all-containers:
@bash ./docker/scripts.sh remove-all-containers
docker-remove-all-images:
@bash ./docker/scripts.sh remove-all-images
docker-refresh:
@make docker-remove-all-containers
@echo "-------- -------- -------->"
@make docker-remove-all-images
@echo "-------- -------- -------->"
@make docker-start