-
Notifications
You must be signed in to change notification settings - Fork 40
/
Makefile
66 lines (50 loc) · 2.01 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
include .env
.PHONY: up down webapp api consume vagrant
.env: ## Setup .env from dist
cp .env.dist .env
up: .env ## Start the Docker Compose stack.
docker-compose up -d
down: ## Stop the Docker Compose stack.
docker-compose down
webapp: ## Run bash in the webapp service.
docker-compose exec webapp bash
api: ## Run bash in the api service.
docker-compose exec api bash
consume: ## Consume messages from the queue.
docker-compose exec api php bin/console messenger:consume async -vv
vagrant: ## Create the Vagrantfile from the template Vagrantfile.template.
./scripts/create-vagrantfile-from-template.sh \
$(VAGRANT_BOX) \
$(VAGRANT_PROJECT_NAME) \
$(VAGRANT_MEMORY) \
$(VAGRANT_CPUS) \
$(VAGRANT_DOCKER_COMPOSE_VERSION)
.PHONY: create-migrate
create-migrate: ## Create a new migration file
docker-compose exec api bin/console doctrine:database:drop --force
docker-compose exec api bin/console doctrine:database:create -n
docker-compose exec api bin/console doctrine:migrations:migrate -n
docker-compose exec api bin/console make:migration
docker-compose exec api bin/console doctrine:migrations:migrate -n
.PHONY: graphql-print-schema
graphql-print-schema: ## Display current GraphQL Schema
docker-compose exec api ./bin/console graphqlite:dump-schema
.PHONY: test-% lint-%
test-api: ## Launch test in api
docker-compose exec api composer yaml-lint
docker-compose exec api composer cscheck
docker-compose exec api composer phpstan
docker-compose exec api composer pest
docker-compose exec api composer deptrac
test-webapp: ## Launch test in webapp
docker-compose exec webapp yarn lint
lint-api: ## Launch linter in api
docker-compose exec api composer yaml-lint
docker-compose exec api composer csfix
docker-compose exec api composer cscheck
lint-webapp: ## Launch linter in webapp
docker-compose exec webapp yarn lint:fix
docker-compose exec webapp yarn lint
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)