-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
59 lines (53 loc) · 1.99 KB
/
cloudbuild.yaml
File metadata and controls
59 lines (53 loc) · 1.99 KB
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
steps:
# Build frontend
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/vue-multiagent-frontend:latest', './frontend']
# Build backend
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/vue-multiagent-backend:latest', './backend']
# Push images
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/vue-multiagent-frontend:latest']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/vue-multiagent-backend:latest']
# Deploy backend to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'vue-multiagent-backend'
- '--image'
- 'gcr.io/$PROJECT_ID/vue-multiagent-backend:latest'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
- '--allow-unauthenticated'
- '--add-cloudsql-instances'
- 'mythic-aloe-467602-t4:us-central1:vue-multiagent-db'
- '--set-env-vars'
- 'INSTANCE_CONNECTION_NAME=mythic-aloe-467602-t4:us-central1:vue-multiagent-db,DB_USER=root,DB_NAME=vue_app,FRONTEND_URL=https://vue-multiagent-frontend-129438231958.us-central1.run.app'
- '--set-secrets'
- 'OPENAI_API_KEY=openai-api-key:latest,SECRET_KEY=jwt-secret-key:latest,DB_PASS=db-password:latest,SMTP_USER=SMTP_USER:latest,SMTP_PASSWORD=SMTP_PASSWORD:latest,FROM_EMAIL=FROM_EMAIL:latest'
- '--timeout'
- '300'
- '--memory'
- '512Mi'
# Deploy frontend to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args:
- 'run'
- 'deploy'
- 'vue-multiagent-frontend'
- '--image'
- 'gcr.io/$PROJECT_ID/vue-multiagent-frontend:latest'
- '--region'
- 'us-central1'
- '--platform'
- 'managed'
- '--allow-unauthenticated'
images:
- 'gcr.io/$PROJECT_ID/vue-multiagent-frontend:latest'
- 'gcr.io/$PROJECT_ID/vue-multiagent-backend:latest'