-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yaml
43 lines (37 loc) · 1.12 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
version: '3'
tasks:
dev:
desc: Create docker containers for dev purposes.
cmds:
- docker compose up -d
create-cluster:
desc: Create a K3D cluster.
aliases: [create]
cmds:
- k3d cluster create nta-kube
install:
desc: Apply the k8s config to the cluster.
aliases: [apply]
cmds:
- kubectl apply -f infra/namespaces
- kubectl apply -f infra/db
- kubectl apply -f infra/api
- kubectl apply -f infra/webapp
deploy:
desc: Create a cluster and deploy everything in one command.
silent: true
cmds:
- task: create
- task: install
- echo "✅ The cluster is deployed. Please use 'task port' to port-forward the web app. You may need for a bit before it's ready."
port-forward:
desc: Port-forward the webapp to access on local machine.
aliases: [port]
cmds:
- kubectl -n webapp port-forward service/nta-kube-webapp 8080:3000
delete-cluster:
desc: Delete the cluster
aliases: [delete, destroy]
prompt: You are going to delete the cluster 'nta-kube'. Are you sure?
cmds:
- k3d cluster delete nta-kube