-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
99 lines (71 loc) · 1.75 KB
/
Makefile
File metadata and controls
99 lines (71 loc) · 1.75 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
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
ARGS = $(filter-out $@,$(MAKECMDGOALS))
MAKEFLAGS += --silent
list:
sh -c "echo; $(MAKE) -p no_targets__ | awk -F':' '/^[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {split(\$$1,A,/ /);for(i in A)print A[i]}' | grep -v '__\$$' | grep -v 'Makefile'| sort"
#############################
# Docker machine states
#############################
up:
docker-compose up -d
build:
docker-compose up --build
start:
docker-compose start
stop:
docker-compose stop
state:
docker-compose ps
rebuild: stop
docker-compose pull
docker-compose rm --force php
docker-compose build --no-cache --pull
docker-compose up -d --force-recreate
#############################
# Composer
#############################
composer:
docker-compose exec php composer $(ARGS)
composer-install:
docker-compose exec php composer install
composer-update:
docker-compose exec php composer update
#############################
# Tests
#############################
test:
# bash ./bin/import.sh ./tests/fixtures/database.sql
docker-compose exec php composer test
# Broken
testcoverage:
# bash ./bin/import.sh ./tests/fixtures/database.sql
docker-compose exec php composer testcoverage
#############################
# MySQL
#############################
mysql-backup:
bash ./bin/backup.sh
mysql-restore:
bash ./bin/restore.sh
mysql-import:
bash ./bin/import.sh $(ARGS)
#############################
# General
#############################
backup: mysql-backup
restore: mysql-restore
exec:
docker-compose exec php $(ARGS)
ssh:
docker-compose exec php /bin/bash
#############################
# Xdebug
#############################
xdebug-enable:
bin/xdebug.sh enable
xdebug-disable:
bin/xdebug.sh disable
#############################
# Argument fix workaround
#############################
%:
@: