feat: migrate realtime-collab from Docker Compose to k3s
Add k3s manifests for postgres, redis, and backend Fix users table constraint and init.sql
This commit is contained in:
49
k3s/backend.yaml
Normal file
49
k3s/backend.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: realtime-collab-backend
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: realtime-collab-backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: realtime-collab-backend
|
||||
spec:
|
||||
containers:
|
||||
- name: backend
|
||||
image: realtime-collab-backend:latest
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: realtime-collab-secret
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "300m"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: realtime-collab-backend-svc
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: realtime-collab-backend
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
nodePort: 30080
|
||||
Reference in New Issue
Block a user