-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.json
60 lines (60 loc) · 2.07 KB
/
tasks.json
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
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Development - Backend",
"type": "shell",
"command": "source ~/.zshrc && source ./scripts/run-backend-functions.sh"
},
{
"label": "Development - UI",
"type": "shell",
"command": "cd ui && npm run serve"
},
{
"label": "Deploy - Backend function (one)",
"type": "shell",
"command": "gcloud functions deploy ${input:name} --runtime python310 --trigger-http --allow-unauthenticated --memory ${input:memory} --source ${workspaceFolder}/functions/${input:name} --region europe-west1 --max-instances ${input:max-instances} --timeout ${input:timeout} --set-env-vars \"$(paste -d, -s ./functions/.env.production)\""
},
{
"label": "Deploy - Backend function (all)",
"type": "shell",
"command": "source scripts/deploy-backend.sh"
},
{
"label": "Deploy - UI",
"type": "shell",
"command": "source ~/.zshrc && source scripts/deploy-ui.sh",
}
],
"inputs": [
{
"type": "promptString",
"id": "name",
"description": "Name of the function",
"default": ""
},
{
"type": "pickString",
"id": "memory",
"description": "Memory allocated for the function",
"default": "128MB",
"options": ["128MB", "256MB", "512MB", "1024MB", "2048MB", "4096MB", "8192MB"]
},
{
"type": "pickString",
"id": "timeout",
"description": "Timeout for the function",
"default": "60",
"options": ["10", "60", "120", "180", "240", "540"]
},
{
"type": "promptString",
"id": "max-instances",
"description": "Maximum number of instances",
"default": "1"
},
]
}