-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
taskfile.yml
153 lines (133 loc) · 3.28 KB
/
taskfile.yml
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: 3
vars:
SAIL: ./vendor/bin/sail
tasks:
build:
desc: Build Laravel Sail application image
cmds:
- test -f '.env' && echo "Env file exists, skip" || cp .env.example .env
- task: run
vars: { cmd: build --no-cache }
- task: start
- task: deps
- task: migrate
- task: stop
start:
desc: Start Laravel Sail containers
cmds:
- task: run
vars: { cmd: up -d }
stop:
desc: Stop Laravel Sail containers
cmds:
- task: run
vars: { cmd: down }
purge:
desc: Stop Laravel Sail containers and remove volumes
cmds:
- task: run
vars: { cmd: down -v }
test:
desc: Run Laravel Sail application tests
cmds:
- task: run
vars: { cmd: test }
deps:
desc: Install Composer dependencies
cmds:
- task: run
vars: { cmd: composer install }
cache:
desc: Optimize Laravel cache
cmds:
- task: run
vars: { cmd: artisan optimize }
- task: run
vars: { cmd: artisan event:cache }
- task: run
vars: { cmd: artisan config:cache }
- task: run
vars: { cmd: artisan route:cache }
- task: run
vars: { cmd: artisan view:cache }
- task: run
vars: { cmd: artisan storage:link }
cache:clear:
desc: Clear Laravel cache
cmds:
- task: run
vars: { cmd: artisan cache:clear }
- task: run
vars: { cmd: artisan config:clear }
- task: run
vars: { cmd: artisan event:clear }
- task: run
vars: { cmd: artisan optimize:clear }
- task: run
vars: { cmd: artisan route:clear }
- task: run
vars: { cmd: artisan view:clear }
migrate:
desc: Run database migrations
cmds:
- task: run
vars: { cmd: artisan migrate }
migrate:fresh:
desc: Recreate database from scratch
cmds:
- task: run
vars: { cmd: artisan migrate:fresh }
seed:
desc: Seed initial records into database
cmds:
- task: run
vars: { cmd: artisan migrate:fresh --seed }
stubs:
desc: Generate Laravel stubs and model comments
cmds:
- task: run
vars: { cmd: artisan clear-compiled }
# - task: run
# vars: { cmd: artisan ide-helper:generate }
- task: run
vars: { cmd: artisan ide-helper:models -W }
- task: fmt
shell:
desc: Attach PHP container console
cmds:
- task: run
vars: { cmd: shell }
sql:
desc: Attach SQL container console
cmds:
- task: run
vars: { cmd: artisan db }
schedule:
desc: Run Laravel scheduler (cron)
cmds:
- task: run
vars: { cmd: artisan schedule:work }
queue:
desc: Run Laravel worker (queue)
cmds:
- task: run
vars: { cmd: artisan queue:listen -v --timeout=0 }
fmt:
desc: Run Code Style formatter
cmds:
- task: run
vars: { cmd: composer fmt }
lint:
desc: Run static analysis
cmds:
- task: run
vars: { cmd: composer validate }
- task: run
vars: { cmd: composer lint }
run:
desc: Run command inside of Laravel Sail PHP container (such as artisan, composer, etc)
silent: true
requires:
vars: [cmd]
cmds:
- "{{ .SAIL }} {{ .cmd }}"