-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (36 loc) · 1.21 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
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
.PHONY: run
run: build start deps
.PHONY: build
build:
@docker-compose build
.PHONY: start
start:
@docker-compose up --detach
.PHONY: deps
deps: composer/install
.PHONY: database
database:
# here wait for database service
@docker-compose exec --user $$(id -u):$$(id -g) web php bin/console doctrine:database:create --if-not-exists
@docker-compose exec --user $$(id -u):$$(id -g) web php bin/console doctrine:migrations:migrate --no-interaction
.PHONY: stop
stop:
@docker-compose stop
composer/install:
@docker-compose exec --user $$(id -u):$$(id -g) web composer install --prefer-dist
.PHONY: tests
tests:
@docker-compose exec web php vendor/phpunit/phpunit/phpunit \
--bootstrap ./tests/bootstrap.php \
--configuration ./phpunit.xml.dist \
./tests
.PHONY: console
console:
@docker-compose exec --user $$(id -u):$$(id -g) web php bin/console $(call args)
.PHONY: composer/require
composer/require:
@docker-compose exec --user $$(id -u):$$(id -g) web composer require --prefer-dist $(call args)
.PHONY: composer/require-dev
composer/require-dev:
@docker-compose exec --user $$(id -u):$$(id -g) web composer require --dev --prefer-dist $(call args)