This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·83 lines (61 loc) · 2.07 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
init: docker-down-clear \
api-clear \
docker-pull \
docker-build \
docker-up \
api-init \
frontend-init
up: docker-up
down: docker-down
restart: down up
#################
###################### API ###############################
#################
api-clear:
docker run --rm -v ${PWD}/api:/app -w /app alpine sh -c 'rm -rf storage/logs/* storage/framework/cache/* storage/framework/sessions/* storage/framework/views/*'
api-init: api-composer-install api-wait-db api-migrations
api-composer-install:
docker-compose run --rm api-php-cli composer install
api-wait-db:
docker-compose run --rm api-php-cli wait-for-it api-postgres:5432 -t 30
api-migrations:
docker-compose run --rm api-php-cli php artisan migrate
#################
###################### FRONT ###############################
#################
frontend-init: frontend-npm-install frontend-ready
frontend-npm-install:
docker-compose run --rm frontend-node-cli npm install
frontend-ready:
docker run --rm -v ${PWD}/frontend:/app -w /app alpine touch .ready
#################
###################### FRONT ###############################
#################
#################
###################### DOCKER ###############################
#################
docker-up:
docker-compose up -d
docker-down:
docker-compose down --remove-orphans
docker-down-clear:
docker-compose down -v --remove-orphans
docker-pull:
docker-compose pull
docker-build:
docker-compose build
#################
###################### CODE STYLE CHECKS ###############################
#################
api-check: api-psalm api-lint tests
api-psalm:
docker-compose run --rm api-php-cli composer psalm --no-cache
api-lint:
docker-compose run --rm api-php-cli composer lint
tests:
docker-compose run --rm api-php-cli php artisan test
code-style-app: api-prettier frontend-prettier
api-prettier:
docker-compose run --rm frontend-node-cli npm run prettier -- /php/app --write
frontend-prettier:
docker-compose run --rm frontend-node-cli npm run prettier -- /app/src --write