-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (64 loc) · 2.6 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
include .env
export
RUN_ARGS = $(filter-out $@,$(MAKECMDGOALS))
include .make/utils.mk
include .make/docker-compose-shared-services.mk
include .make/composer.mk
include .make/static-analysis.mk
.PHONY: install
install: erase build shared-service-up up wait setup ## clean current environment, recreate dependencies and spin up again
.PHONY: start up-services
up: ##up-services ## spin up environment
docker-compose up -d
.PHONY: start services
up-services: shared-service-up ## up shared services
.PHONY: stop services
stop-services: shared-service-stop ## stop shared services
.PHONY: stop
stop: ## stop environment
docker-compose stop
.PHONY: erase
erase: ## stop and delete containers, clean volumes.
docker-compose stop
docker-compose rm -v -f
.PHONY: build
build: ## build environment and initialize composer and project dependencies
docker-compose build
docker-compose run --rm --no-deps php sh -lc 'composer install'
.PHONY: composer-preload
composer-preload: ## Generate preload config file
docker-compose run --rm --no-deps php sh -lc 'composer preload'
.PHONY: setup
setup: setup-enqueue setup-db ## build environment and initialize composer and project dependencies
.PHONY: setup-db
setup-db: ## recreate database
docker-compose run --rm php sh -lc './bin/console d:d:d --force --if-exists'
docker-compose run --rm php sh -lc './bin/console d:d:c'
docker-compose run --rm php sh -lc './bin/console d:m:m -n'
.PHONY: setup-enqueue
setup-enqueue: ## setup enqueue
docker-compose run --rm php sh -lc './bin/console enqueue:setup-broker -c task'
docker-compose run --rm php sh -lc './bin/console enqueue:setup-broker -c taskevent'
.PHONY: clear-events
clear-events: ## setup enqueue
docker-compose run --rm php sh -lc './bin/console cleaner:clear db'
.PHONY: schema-validate
schema-validate: ## validate database schema
docker-compose run --rm php sh -lc './bin/console d:s:v'
.PHONY: migration-generate
migration-generate: ## generate new database migration
docker-compose run --rm php sh -lc './bin/console d:m:g'
.PHONY: migration-migrate
migration-migrate: ## run database migration
docker-compose run --rm php sh -lc './bin/console d:m:m'
.PHONY: php-shell
php-shell: ## PHP shell
docker-compose run --rm php sh -l
.PHONY: php-test
php-test: ## PHP shell without deps
docker-compose run --rm --no-deps php sh -l
.PHONY: clean
clean: ## Clear build vendor report folders
rm -rf build/ vendor/ var/
.PHONY: test static-analysis coding-standards tests-unit tests-integration composer-validate
test: install static-analysis coding-standards tests-unit tests-integration composer-validate stop ## Run all test suites