-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
119 lines (101 loc) · 2.97 KB
/
Taskfile.yaml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3'
tasks:
install:
desc: Build and start the Docker containers
cmds:
- cmd: cp apps/web/.env.dist apps/web/.env
ignore_error: true
- task: bootstrap
- task: ssl
start:
desc: Start the Docker containers
cmds:
- docker compose up -d
- task: migrations
vars:
CLI_ARGS: --no-interaction
stop:
desc: Stop the Docker containers
cmds:
- docker compose down
ssl:
internal: true
cmds:
- mkcert -key-file certs/local-key.pem -cert-file certs/local-cert.pem *.app.localhost app.localhost
- mkcert -install
status:
- test -f certs/local-cert.pem
- test -f certs/local-key.pem
bootstrap:
cmds:
- docker compose -f docker-compose.yml -f docker-compose.tools.yml build
- docker compose pull
- task: composer_install
- task: yarn_install
composer_install:
cmds:
- task: composer
vars:
CLI_ARGS: install --no-interaction --no-progress --prefer-dist
sources:
- ./apps/api/composer.json
- ./apps/api/composer.lock
generates:
- ./apps/api/vendor/**/*
yarn_install:
cmds:
- task: yarn
vars:
CLI_ARGS: install --immutable
sources:
- ./apps/web/package.json
- ./apps/web/yarn.lock
generates:
- ./apps/web/.yarn/install-state.gz
- ./apps/web/node_modules/**/*
composer:
desc: Shortcut to run Composer CLI
cmds:
- docker compose -f docker-compose.yml run --rm php composer {{.CLI_ARGS}}
console:
desc: Shortcut to run Symfony console
cmds:
- docker compose run --rm php console {{.CLI_ARGS}}
phpstan:
desc: Shortcut to run PHPStan
cmds:
- docker compose -f docker-compose.tools.yml run --rm --entrypoint=composer phpstan install --ignore-platform-reqs
- docker compose -f docker-compose.tools.yml run --rm phpstan {{.CLI_ARGS}}
deptrac:
desc: Shortcut to run Deptrac
cmds:
- docker compose -f docker-compose.tools.yml run --rm deptrac {{.CLI_ARGS}}
cs-fixer:
desc: Shortcut to run PHP CS Fixer
cmds:
- docker compose -f docker-compose.tools.yml run --rm cs-fixer {{.CLI_ARGS}}
rector:
desc: Shortcut to run Rector
cmds:
- docker compose -f docker-compose.tools.yml run --rm rector {{.CLI_ARGS}}
phpspec:
desc: Shortcut to run Php Spec
cmds:
- docker compose -f docker-compose.tools.yml run --rm --no-deps phpspec run
yarn:
desc: Shortcut to run Yarn CLI
cmds:
- docker compose run --rm node yarn {{.CLI_ARGS}}
eslint:
desc: Shortcut to run Eslint CLI
cmds:
- docker compose run --rm node yarn eslint {{.CLI_ARGS}}
migrations:
desc: Shortcut to run Doctrine migrations
cmds:
- task: console
vars:
CLI_ARGS: doctrine:database:create --if-not-exists {{.CLI_ARGS}}
- task: console
vars:
CLI_ARGS: doctrine:migrations:migrate --allow-no-migration {{.CLI_ARGS}}