-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
36 lines (35 loc) · 1.07 KB
/
cloudbuild.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
steps:
# Build the Docker image using the Dockerfile
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "gcr.io/$PROJECT_ID/chess-backend", "."]
# Push the Docker image to Google Container Registry
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/$PROJECT_ID/chess-backend"]
# Deploy the service to Google Cloud Run
- name: "gcr.io/cloud-builders/gcloud"
args:
- "run"
- "deploy"
- "chess-backend"
- "--image"
- "gcr.io/$PROJECT_ID/chess-backend"
- "--platform"
- "managed"
- "--region"
- "eu-west1"
- "--min-instances"
- "0"
- "--max-instances"
- "10"
- "--concurrency"
- "160"
- "--timeout"
- "3600"
- "--port"
- "3000"
- '--set-env-vars'
- 'AMQP_HOST=kebnekaise.lmq.cloudamqp.com,AMQP_USER=aqncaupq'
- '--update-secrets'
- 'AMQP_PASSWORD:version=latest:secret=CloudAMQP_Primary_Broker_Password,AMQP_URL:version=latest:secret=CloudAMQP_Primary_Broker_URL'
images:
- "gcr.io/$PROJECT_ID/chess-backend"