-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcloudbuild_deploy_app.yaml
47 lines (45 loc) · 2.02 KB
/
cloudbuild_deploy_app.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
44
45
46
47
steps:
# Deploy to Google Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: 'gcloud'
args:
- 'run'
- 'deploy'
- 'llama-flask-service'
- '--image'
- 'gcr.io/mev-fyi/llama-flask-app:$SHORT_SHA'
- '--region'
- 'us-central1'
- '--allow-unauthenticated'
- '--service-account'
- '--update-env-vars'
- 'OPENAI_API_KEY=sm://mev-fyi/OPENAI_API_KEY,' # Add other secrets similarly
- 'OPENAI_API_BASE_ANYSCALE=sm://mev-fyi/OPENAI_API_BASE_ANYSCALE,' # Add other secrets similarly
- 'YOUTUBE_API_KEY=sm://mev-fyi/YOUTUBE_API_KEY,'
- 'ASSEMBLY_AI_API_KEY=sm://mev-fyi/ASSEMBLY_AI_API_KEY,'
- 'PINECONE_API_KEY=sm://mev-fyi/PINECONE_API_KEY,'
- 'PINECONE_API_ENVIRONMENT=sm://mev-fyi/PINECONE_API_ENVIRONMENT,'
- 'ASSEMBLY_AI_API=sm://mev-fyi/ASSEMBLY_AI_API,'
- 'YOUTUBE_CHANNELS=sm://mev-fyi/YOUTUBE_CHANNELS'
images:
- 'gcr.io/mev-fyi/llama-flask-app:$SHORT_SHA'
# Define the secrets to be available as environment variables in the Cloud Run service
availableSecrets:
secretManager:
- versionName: projects/mev-fyi/secrets/OPENAI_API_KEY/versions/latest
env: 'OPENAI_API_KEY'
- versionName: projects/mev-fyi/secrets/OPENAI_API_BASE_ANYSCALE/versions/latest
env: 'OPENAI_API_BASE_ANYSCALE'
- versionName: projects/mev-fyi/secrets/YOUTUBE_API_KEY/versions/latest
env: 'YOUTUBE_API_KEY'
- versionName: projects/mev-fyi/secrets/ASSEMBLY_AI_API_KEY/versions/latest
env: 'ASSEMBLY_AI_API_KEY'
- versionName: projects/mev-fyi/secrets/PINECONE_API_KEY/versions/latest
env: 'PINECONE_API_KEY'
- versionName: projects/mev-fyi/secrets/PINECONE_API_ENVIRONMENT/versions/latest
env: 'PINECONE_API_ENVIRONMENT'
- versionName: projects/mev-fyi/secrets/ASSEMBLY_AI_API/versions/latest
env: 'ASSEMBLY_AI_API'
- versionName: projects/mev-fyi/secrets/YOUTUBE_CHANNELS/versions/latest
env: 'YOUTUBE_CHANNELS'