init: web portal
Some checks failed
Build and Push Images / build-backend (push) Has been cancelled

This commit is contained in:
qorgh529
2026-04-06 21:16:17 +09:00
commit 5e7e245858
21 changed files with 1717 additions and 0 deletions

68
k8s/04-backend.yaml Executable file
View File

@@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: web-portal
spec:
replicas: 1
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
imagePullSecrets:
- name: gitea-registry-secret
containers:
- name: backend
image: 192.168.x.x:3000/username/portal-backend:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
env:
- name: DB_HOST
value: postgres-service
- name: DB_PORT
value: "5432"
- name: DB_NAME
value: portaldb
- name: DB_USER
value: portaluser
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: portal-secrets
key: db-password
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: portal-secrets
key: jwt-secret
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 20
periodSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 60
periodSeconds: 15
failureThreshold: 5
---
apiVersion: v1
kind: Service
metadata:
name: backend-service
namespace: web-portal
spec:
selector:
app: backend
ports:
- port: 8000
targetPort: 8000