forked from PECE-project/drupal-pece
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
126 lines (96 loc) · 2.79 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.PHONY: run
run:
docker-compose -f docker-compose-dev.yml run --rm -p 8080:80 dev_pece
.PHONY: in
in:
docker ps
docker exec -it $(shell docker-compose ps | grep _dev_ | cut -d" " -f 1) /bin/bash
.PHONY: out
out:
docker-compose -f docker-compose-dev.yml stop
.PHONY: up
up:
docker-compose up -d --remove-orphans
.PHONY: stop
stop:
docker-compose stop
.PHONY: clean
clean:
docker-compose down
rm -rf ./node_modules
rm -rf ./cnf
rm -rf ./builds
rm -rf ./build
.PHONY: ps
ps:
docker-compose ps
.PHONY: logs
logs:
docker-compose logs $(filter-out $@,$(MAKECMDGOALS))
.PHONY: distro-clean
distro-clean:
docker-compose down
rm -rf ./build
.PHONY: drush
drush:
docker exec $(shell docker-compose ps | grep _php | cut -d" " -f 1) bash -c 'drush -r build $(filter-out $@,$(MAKECMDGOALS))'
.PHONY: shell
shell:
docker-compose exec php bash
.PHONY: install
install:
docker-compose -f docker-compose-dev.yml run --rm dev_pece npm install
.PHONY: setup
setup:
docker-compose -f docker-compose-dev.yml run --rm dev_pece gulp setup
.PHONY: build
build:
docker-compose -f docker-compose-dev.yml run --rm dev_pece gulp build
.PHONY: site-install
site-install:
docker-compose -f docker-compose-dev.yml run --rm dev_pece gulp site-install
.PHONY: build-dev
build-dev:
docker-compose -f docker-compose-dev.yml run --rm dev_pece npm install && gulp setup && gulp build && gulp site-install
.PHONY: exec
exec:
docker-compose exec php bash -c $(filter-out $@,$(MAKECMDGOALS))
.PHONY: prod
prod:
docker-compose run --rm -p 8080:80 production
distro: distro-clean
docker-compose run --rm production gulp pack-distro
.PHONY: ps-prod
ps-prod:
docker-compose -f docker-compose-prod.yml -f docker-compose-prod.override.yml ps
.PHONY: run-prod
run-prod:
docker-compose -f docker-compose-prod.yml -f docker-compose-prod.override.yml up -d --remove-orphans
.PHONY: stop-prod
stop-prod:
docker-compose -f docker-compose-prod.yml stop
.PHONY: in-prod
in-prod:
docker-compose -f docker-compose-prod.yml exec php_v1 /bin/bash
.PHONY: shell-prod
shell-prod: in-prod
.PHONY: drush-prod
drush-prod:
docker exec $(shell docker-compose ps | grep _php_v1 | cut -d" " -f 1) bash -c 'drush -r build $(filter-out $@,$(MAKECMDGOALS))'
.PHONY: logs-prod
logs-prod:
docker-compose -f docker-compose-prod.yml logs $(filter-out $@,$(MAKECMDGOALS))
.PHONY: logs-prod-nginx
logs-prod-nginx:
docker-compose -f docker-compose-prod.yml logs nginx_v1
.PHONY: logs-prod-php
logs-prod-php:
docker-compose -f docker-compose-prod.yml logs php_v1
.PHONY: logs-prod-mysql
logs-prod-mysql:
docker-compose -f docker-compose-prod.yml logs db_v1
.PHONY: run-matrix-permissions
run-matrix-permissions:
docker-compose -f docker-compose-prod.yml exec php_v1 sh -c "cd build && php ./scripts/run-tests.sh --concurrency 3 --url http://v1.pece.local PECE"
%:
@: