-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-container-apps.yaml
More file actions
91 lines (81 loc) · 2.52 KB
/
azure-container-apps.yaml
File metadata and controls
91 lines (81 loc) · 2.52 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
# Azure Container Apps Configuration
# This file defines the container app configuration for Azure deployment
properties:
managedEnvironmentId: /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.App/managedEnvironments/{environment-name}
configuration:
ingress:
external: true
targetPort: 8000
transport: auto
allowInsecure: false
traffic:
- weight: 100
latestRevision: true
secrets:
- name: cosmos-connection-string
value: # Set via Azure Portal or CLI
- name: secret-key
value: # Set via Azure Portal or CLI
- name: redis-connection-string
value: # Set via Azure Portal or CLI
registries:
- server: {your-acr-name}.azurecr.io
username: # Set via Azure Portal or CLI
passwordSecretRef: acr-password
template:
containers:
- name: TopicsFlow
image: {your-acr-name}.azurecr.io/TopicsFlow-azure:latest
resources:
cpu: 1.0
memory: 2Gi
env:
# Flask Configuration
- name: FLASK_ENV
value: "azure"
- name: PORT
value: "8000"
- name: SECRET_KEY
secretRef: secret-key
# Azure CosmosDB Configuration
- name: AZURE_COSMOS_CONNECTIONSTRING
secretRef: cosmos-connection-string
- name: AZURE_COSMOS_DATABASE
value: "TopicsFlow"
# Azure Redis Cache (optional)
- name: AZURE_REDIS_CONNECTIONSTRING
secretRef: redis-connection-string
# CORS Configuration
- name: FRONTEND_URL
value: "https://{your-app-name}.azurecontainerapps.io"
# TOTP Configuration
- name: TOTP_ISSUER
value: "TopicsFlow"
# Azure Detection
- name: WEBSITE_INSTANCE_ID
value: "azure-container-apps"
probes:
# Liveness probe
- type: Liveness
httpGet:
path: /health
port: 8000
initialDelaySeconds: 40
periodSeconds: 30
failureThreshold: 3
# Readiness probe
- type: Readiness
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3
scale:
minReplicas: 1
maxReplicas: 10
rules:
- name: http-rule
http:
metadata:
concurrentRequests: "100"