-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
56 lines (48 loc) · 1.46 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
# Makefile for Docker Nginx PHP Composer MySQL
export CURRENT_UID
CURRENT_UID= $(shell id -u):$(shell id -g)
help:
@echo ""
@echo "usage: make COMMAND"
@echo ""
@echo "Commands:"
@echo " install Install PHP dependencies with composer"
@echo " update Update PHP dependencies with composer"
@echo " autoload Update PHP autoload files"
@echo " test Run PHPUnit Tests"
@echo " cmd Open terminal with php"
install:
@docker run --rm \
-u $(CURRENT_UID) \
-v $(shell pwd):/app \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
grandchef/composer:2.8.2 install --ignore-platform-reqs --no-scripts --no-interaction
update:
@docker run --rm \
-u $(CURRENT_UID) \
-v $(shell pwd):/app \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
grandchef/composer:2.8.2 update --no-scripts --no-interaction
autoload:
@docker run --rm \
-u $(CURRENT_UID) \
-v $(shell pwd):/app \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
grandchef/composer:2.8.2 dump-autoload --no-scripts --no-interaction
test:
@docker run --rm -it \
-u $(CURRENT_UID) \
-v $(shell pwd):/app \
-w /app \
grandchef/php:8.2.2-fpm-dev php ./vendor/bin/phpunit --configuration . --no-coverage --colors=always
cmd:
@docker run --rm -it \
-u $(CURRENT_UID) \
-v $(shell pwd):/app \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
-w /app \
grandchef/php:8.2.2-fpm-dev /bin/bash