|
2 | 2 | "version": "2.0.0", |
3 | 3 | "tasks": [ |
4 | 4 | { |
5 | | - "label": "🚀 cms: dev", |
6 | | - "dependsOn": ["📦 strapi: dev", "🌐 next: dev"], |
7 | | - "dependsOrder": "parallel", |
8 | | - "group": { |
9 | | - "kind": "build", |
10 | | - "isDefault": true |
11 | | - }, |
12 | | - "problemMatcher": [], |
13 | | - "icon": { |
14 | | - "id": "rocket", |
15 | | - "color": "terminal.ansiYellow" |
16 | | - } |
17 | | - }, |
18 | | - { |
19 | | - "label": "🐳 docker: db-up", |
20 | | - "type": "shell", |
21 | | - "command": "yarn setup", |
22 | | - "presentation": { |
23 | | - "reveal": "always", |
24 | | - "panel": "dedicated" |
25 | | - }, |
26 | | - "problemMatcher": [], |
27 | | - "icon": { |
28 | | - "id": "server-environment", |
29 | | - "color": "terminal.ansiBlue" |
30 | | - } |
31 | | - }, |
32 | | - { |
33 | | - "label": "📦 strapi: dev", |
| 5 | + "label": "🚀 [Dev] Start All", |
| 6 | + "detail": "Khởi chạy đồng thời Next.js và Strapi", |
34 | 7 | "type": "shell", |
35 | | - "command": "yarn strapi", |
36 | | - "presentation": { |
37 | | - "reveal": "always", |
38 | | - "panel": "dedicated" |
39 | | - }, |
| 8 | + "command": "yarn dev", |
| 9 | + "group": { "kind": "build", "isDefault": true }, |
| 10 | + "presentation": { "reveal": "always", "panel": "shared", "clear": true }, |
40 | 11 | "problemMatcher": [], |
41 | | - "icon": { |
42 | | - "id": "package", |
43 | | - "color": "terminal.ansiYellow" |
44 | | - } |
| 12 | + "icon": { "id": "rocket", "color": "terminal.ansiYellow" } |
45 | 13 | }, |
46 | 14 | { |
47 | | - "label": "🌐 next: dev", |
| 15 | + "label": "🧹 [Dev] Clean Workspace", |
| 16 | + "detail": "Dọn dẹp cache Next.js, build Strapi và kill port bị treo", |
48 | 17 | "type": "shell", |
49 | | - "command": "yarn next", |
50 | | - "presentation": { |
51 | | - "reveal": "always", |
52 | | - "panel": "dedicated" |
53 | | - }, |
| 18 | + "command": "yarn clean:full", |
| 19 | + "presentation": { "reveal": "always", "panel": "shared", "clear": true }, |
54 | 20 | "problemMatcher": [], |
55 | | - "icon": { |
56 | | - "id": "globe", |
57 | | - "color": "terminal.ansiBlue" |
58 | | - } |
| 21 | + "icon": { "id": "trash", "color": "terminal.ansiRed" } |
59 | 22 | }, |
60 | 23 | { |
61 | | - "label": "📖 docs: dev", |
62 | | - "type": "shell", |
63 | | - "command": "yarn docs:dev", |
64 | | - "presentation": { |
65 | | - "reveal": "always", |
66 | | - "panel": "dedicated" |
67 | | - }, |
68 | | - "problemMatcher": [], |
69 | | - "icon": { |
70 | | - "id": "book", |
71 | | - "color": "terminal.ansiMagenta" |
72 | | - } |
73 | | - }, |
74 | | - { |
75 | | - "label": "🌱 seed: dev", |
| 24 | + "label": "🌱 [Dev] Seed Studio UI", |
| 25 | + "detail": "Mở giao diện UI quản lý Seeding và Backup", |
76 | 26 | "type": "shell", |
77 | 27 | "command": "yarn seed:ui", |
78 | | - "presentation": { |
79 | | - "reveal": "always", |
80 | | - "panel": "dedicated" |
81 | | - }, |
82 | | - "problemMatcher": [], |
83 | | - "icon": { |
84 | | - "id": "code", |
85 | | - "color": "terminal.ansiCyan" |
86 | | - } |
87 | | - }, |
88 | | - { |
89 | | - "label": "🧹 cms: clean", |
90 | | - "type": "shell", |
91 | | - "command": "npx kill-port 3000 1337 && yarn clean && npx rimraf next/.next/dev/lock && yarn dev", |
92 | | - "presentation": { |
93 | | - "reveal": "always", |
94 | | - "panel": "dedicated" |
95 | | - }, |
96 | | - "problemMatcher": [], |
97 | | - "icon": { |
98 | | - "id": "trash", |
99 | | - "color": "terminal.ansiRed" |
100 | | - } |
101 | | - }, |
102 | | - { |
103 | | - "label": "🔑 registry: login", |
104 | | - "type": "shell", |
105 | | - "command": "docker login ${input:registry}", |
106 | | - "presentation": { |
107 | | - "reveal": "always", |
108 | | - "panel": "new" |
109 | | - }, |
110 | | - "problemMatcher": [], |
111 | | - "icon": { |
112 | | - "id": "key", |
113 | | - "color": "terminal.ansiYellow" |
114 | | - } |
115 | | - }, |
116 | | - { |
117 | | - "label": "🐳 docker: build-strapi", |
118 | | - "type": "shell", |
119 | | - "command": "docker build -t ${input:registry}/strapi-app:${input:tag} ./strapi", |
120 | | - "presentation": { |
121 | | - "reveal": "always", |
122 | | - "panel": "new", |
123 | | - "group": "docker-build" |
124 | | - }, |
125 | | - "problemMatcher": [], |
126 | | - "icon": { |
127 | | - "id": "server-environment", |
128 | | - "color": "terminal.ansiBlue" |
129 | | - } |
130 | | - }, |
131 | | - { |
132 | | - "label": "🐳 docker: build-next", |
133 | | - "type": "shell", |
134 | | - "command": "docker build -t ${input:registry}/next-app:${input:tag} ./next", |
135 | | - "presentation": { |
136 | | - "reveal": "always", |
137 | | - "panel": "new", |
138 | | - "group": "docker-build" |
139 | | - }, |
140 | | - "problemMatcher": [], |
141 | | - "icon": { |
142 | | - "id": "server-environment", |
143 | | - "color": "terminal.ansiBlue" |
144 | | - } |
145 | | - }, |
146 | | - { |
147 | | - "label": "🐳 docker: build-all", |
148 | | - "dependsOrder": "sequence", |
149 | | - "dependsOn": [ |
150 | | - "🐳 docker: build-strapi", |
151 | | - "🐳 docker: build-next" |
152 | | - ], |
153 | | - "problemMatcher": [], |
154 | | - "icon": { |
155 | | - "id": "server-environment", |
156 | | - "color": "terminal.ansiBlue" |
157 | | - } |
158 | | - }, |
159 | | - { |
160 | | - "label": "🐳 registry: push-strapi", |
161 | | - "dependsOn": ["🐳 docker: build-strapi"], |
162 | | - "type": "shell", |
163 | | - "command": "docker push ${input:registry}/strapi-app:${input:tag}", |
164 | | - "presentation": { |
165 | | - "reveal": "always", |
166 | | - "panel": "new", |
167 | | - "group": "docker-build" |
168 | | - }, |
169 | | - "problemMatcher": [], |
170 | | - "icon": { |
171 | | - "id": "server-environment", |
172 | | - "color": "terminal.ansiBlue" |
173 | | - } |
174 | | - }, |
175 | | - { |
176 | | - "label": "🐳 registry: push-next", |
177 | | - "dependsOn": ["🐳 docker: build-next"], |
178 | | - "type": "shell", |
179 | | - "command": "docker push ${input:registry}/next-app:${input:tag}", |
180 | | - "presentation": { |
181 | | - "reveal": "always", |
182 | | - "panel": "new", |
183 | | - "group": "docker-build" |
184 | | - }, |
185 | | - "problemMatcher": [], |
186 | | - "icon": { |
187 | | - "id": "server-environment", |
188 | | - "color": "terminal.ansiBlue" |
189 | | - } |
190 | | - }, |
191 | | - { |
192 | | - "label": "🐳 registry: push-all", |
193 | | - "dependsOrder": "sequence", |
194 | | - "dependsOn": [ |
195 | | - "🐳 registry: push-strapi", |
196 | | - "🐳 registry: push-next" |
197 | | - ], |
198 | | - "problemMatcher": [], |
199 | | - "icon": { |
200 | | - "id": "server-environment", |
201 | | - "color": "terminal.ansiBlue" |
202 | | - } |
203 | | - }, |
204 | | - { |
205 | | - "label": "🚀 docker compose: local-up", |
206 | | - "type": "shell", |
207 | | - "command": "docker compose up -d", |
208 | | - "presentation": { |
209 | | - "reveal": "always", |
210 | | - "panel": "new", |
211 | | - "group": "docker-local" |
212 | | - }, |
213 | | - "problemMatcher": [], |
214 | | - "icon": { |
215 | | - "id": "rocket", |
216 | | - "color": "terminal.ansiYellow" |
217 | | - } |
218 | | - }, |
219 | | - { |
220 | | - "label": "🛑 docker compose: local-down", |
221 | | - "type": "shell", |
222 | | - "command": "docker compose down", |
223 | | - "presentation": { |
224 | | - "reveal": "always", |
225 | | - "panel": "new", |
226 | | - "group": "docker-local" |
227 | | - }, |
228 | | - "problemMatcher": [], |
229 | | - "icon": { |
230 | | - "id": "stop", |
231 | | - "color": "terminal.ansiRed" |
232 | | - } |
233 | | - }, |
234 | | - { |
235 | | - "label": "📜 docker compose: local-logs", |
236 | | - "type": "shell", |
237 | | - "command": "docker compose logs -f", |
238 | | - "presentation": { |
239 | | - "reveal": "always", |
240 | | - "panel": "new", |
241 | | - "group": "docker-local" |
242 | | - }, |
243 | | - "problemMatcher": [], |
244 | | - "icon": { |
245 | | - "id": "file-text", |
246 | | - "color": "terminal.ansiCyan" |
247 | | - } |
248 | | - }, |
249 | | - { |
250 | | - "label": "🚀 docker compose: prod-up", |
251 | | - "type": "shell", |
252 | | - "command": "docker compose -f compose.prod.yml pull && docker compose -f compose.prod.yml up -d", |
253 | | - "presentation": { |
254 | | - "reveal": "always", |
255 | | - "panel": "new", |
256 | | - "group": "docker-prod" |
257 | | - }, |
| 28 | + "presentation": { "reveal": "always", "panel": "shared" }, |
258 | 29 | "problemMatcher": [], |
259 | | - "icon": { |
260 | | - "id": "rocket", |
261 | | - "color": "terminal.ansiYellow" |
262 | | - } |
| 30 | + "icon": { "id": "code", "color": "terminal.ansiCyan" } |
263 | 31 | }, |
264 | 32 | { |
265 | | - "label": "🛑 docker compose: prod-down", |
| 33 | + "label": "🐳 [Docker] Local DB Up", |
| 34 | + "detail": "Khởi động container cơ sở dữ liệu", |
266 | 35 | "type": "shell", |
267 | | - "command": "docker compose -f compose.prod.yml down", |
268 | | - "presentation": { |
269 | | - "reveal": "always", |
270 | | - "panel": "new", |
271 | | - "group": "docker-prod" |
272 | | - }, |
| 36 | + "command": "yarn setup:db", |
| 37 | + "presentation": { "reveal": "always", "panel": "shared" }, |
273 | 38 | "problemMatcher": [], |
274 | | - "icon": { |
275 | | - "id": "stop", |
276 | | - "color": "terminal.ansiRed" |
277 | | - } |
| 39 | + "icon": { "id": "database", "color": "terminal.ansiBlue" } |
278 | 40 | }, |
279 | 41 | { |
280 | | - "label": "📜 docker compose: prod-logs", |
| 42 | + "label": "🚢 [Deploy] Build & Push Images", |
| 43 | + "detail": "Đóng gói và đẩy Docker image lên Registry (Next.js & Strapi)", |
281 | 44 | "type": "shell", |
282 | | - "command": "docker compose -f compose.prod.yml logs -f", |
283 | | - "presentation": { |
284 | | - "reveal": "always", |
285 | | - "panel": "new", |
286 | | - "group": "docker-prod" |
287 | | - }, |
| 45 | + "command": "yarn deploy ${input:registry} ${input:tag}", |
| 46 | + "presentation": { "reveal": "always", "panel": "shared", "clear": true }, |
288 | 47 | "problemMatcher": [], |
289 | | - "icon": { |
290 | | - "id": "file-text", |
291 | | - "color": "terminal.ansiCyan" |
292 | | - } |
| 48 | + "icon": { "id": "server-environment", "color": "terminal.ansiMagenta" } |
293 | 49 | } |
294 | 50 | ], |
295 | 51 | "inputs": [ |
|
302 | 58 | { |
303 | 59 | "id": "tag", |
304 | 60 | "type": "promptString", |
305 | | - "description": "Image Tag (e.g. v1, latest, 2024-05-14)", |
| 61 | + "description": "Image Tag (e.g. v1, latest)", |
306 | 62 | "default": "latest" |
307 | 63 | } |
308 | 64 | ] |
|
0 commit comments