-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathazure-container-apps.yaml
More file actions
142 lines (139 loc) · 3.79 KB
/
Copy pathazure-container-apps.yaml
File metadata and controls
142 lines (139 loc) · 3.79 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Azure Container Apps Environment
apiVersion: app.microsoft.com/v1alpha1
kind: ContainerApp
metadata:
name: asyncloom-backend
spec:
managedEnvironmentId: /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.App/managedEnvironments/{environment-name}
configuration:
ingress:
external: true
targetPort: 8000
corsPolicy:
allowedOrigins: ["*"]
allowedMethods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"]
allowedHeaders: ["*"]
secrets:
- name: postgres-connection
value: "{postgres-connection-string}"
- name: github-token
value: "{github-token}"
template:
containers:
- name: backend
image: asyncloom-backend:latest
resources:
cpu: 0.5
memory: 1.0Gi
env:
- name: PORT
value: "8000"
- name: DATABASE_URL
secretRef: postgres-connection
- name: GITHUB_TOKEN
secretRef: github-token
probes:
- type: liveness
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
scale:
minReplicas: 1
maxReplicas: 10
rules:
- name: http-scale
http:
metadata:
concurrentRequests: "50"
---
apiVersion: app.microsoft.com/v1alpha1
kind: ContainerApp
metadata:
name: asyncloom-frontend
spec:
managedEnvironmentId: /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.App/managedEnvironments/{environment-name}
configuration:
ingress:
external: true
targetPort: 80
template:
containers:
- name: frontend
image: asyncloom-frontend:latest
resources:
cpu: 0.25
memory: 0.5Gi
env:
- name: BACKEND_URL
value: "https://asyncloom-backend.{environment-domain}"
scale:
minReplicas: 1
maxReplicas: 5
---
apiVersion: app.microsoft.com/v1alpha1
kind: ContainerApp
metadata:
name: asyncloom-copilot-extension
spec:
managedEnvironmentId: /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.App/managedEnvironments/{environment-name}
configuration:
ingress:
external: true
targetPort: 3000
secrets:
- name: openai-api-key
value: "{openai-api-key}"
template:
containers:
- name: copilot-extension
image: asyncloom-copilot-extension:latest
resources:
cpu: 0.5
memory: 1.0Gi
env:
- name: PORT
value: "3000"
- name: OPENAI_API_KEY
secretRef: openai-api-key
- name: BACKEND_URL
value: "https://asyncloom-backend.{environment-domain}"
scale:
minReplicas: 1
maxReplicas: 3
---
apiVersion: app.microsoft.com/v1alpha1
kind: ContainerApp
metadata:
name: asyncloom-teams-sdk
spec:
managedEnvironmentId: /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.App/managedEnvironments/{environment-name}
configuration:
ingress:
external: true
targetPort: 3978
secrets:
- name: teams-app-id
value: "{teams-app-id}"
- name: teams-app-password
value: "{teams-app-password}"
template:
containers:
- name: teams-sdk
image: asyncloom-teams-sdk:latest
resources:
cpu: 0.5
memory: 1.0Gi
env:
- name: PORT
value: "3978"
- name: TEAMS_APP_ID
secretRef: teams-app-id
- name: TEAMS_APP_PASSWORD
secretRef: teams-app-password
- name: BACKEND_URL
value: "https://asyncloom-backend.{environment-domain}"
scale:
minReplicas: 1
maxReplicas: 3