initial wcag-ada
This commit is contained in:
parent
042b8cb83a
commit
d52cfe7de2
112 changed files with 9069 additions and 0 deletions
69
apps/wcag-ada/k8s/api.yaml
Normal file
69
apps/wcag-ada/k8s/api.yaml
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: wcag-ada-api
|
||||
namespace: wcag-ada
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: wcag-ada-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: wcag-ada-api
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-for-postgres
|
||||
image: busybox:1.36
|
||||
command: ['sh', '-c', 'until nc -z postgres-service 5432; do echo waiting for postgres; sleep 2; done']
|
||||
- name: run-migrations
|
||||
image: wcag-ada/api:latest
|
||||
command: ["bunx", "prisma", "migrate", "deploy"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: wcag-ada-config
|
||||
- secretRef:
|
||||
name: wcag-ada-secrets
|
||||
containers:
|
||||
- name: api
|
||||
image: wcag-ada/api:latest
|
||||
ports:
|
||||
- containerPort: 3001
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: wcag-ada-config
|
||||
- secretRef:
|
||||
name: wcag-ada-secrets
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3001
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3001
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: wcag-ada-api-service
|
||||
namespace: wcag-ada
|
||||
spec:
|
||||
selector:
|
||||
app: wcag-ada-api
|
||||
ports:
|
||||
- port: 3001
|
||||
targetPort: 3001
|
||||
type: ClusterIP
|
||||
Loading…
Add table
Add a link
Reference in a new issue