123 lines
2.9 KiB
YAML
123 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: freedge-backend
|
|
namespace: freedge
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: freedge-backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: freedge-backend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: gitea-registry-secret
|
|
initContainers:
|
|
- name: prisma-db-push
|
|
image: git.arthurbarre.fr/ordinarthur/freedge-backend:latest
|
|
command: ["sh", "-c", "npx prisma db push --skip-generate"]
|
|
envFrom:
|
|
- configMapRef:
|
|
name: freedge-config
|
|
- secretRef:
|
|
name: freedge-secrets
|
|
volumeMounts:
|
|
- name: uploads
|
|
mountPath: /app/uploads
|
|
containers:
|
|
- name: freedge-backend
|
|
image: git.arthurbarre.fr/ordinarthur/freedge-backend:latest
|
|
ports:
|
|
- containerPort: 3000
|
|
envFrom:
|
|
- configMapRef:
|
|
name: freedge-config
|
|
- secretRef:
|
|
name: freedge-secrets
|
|
volumeMounts:
|
|
- name: uploads
|
|
mountPath: /app/uploads
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
volumes:
|
|
- name: uploads
|
|
persistentVolumeClaim:
|
|
claimName: freedge-uploads
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: freedge-frontend
|
|
namespace: freedge
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: freedge-frontend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: freedge-frontend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: gitea-registry-secret
|
|
containers:
|
|
- name: freedge-frontend
|
|
image: git.arthurbarre.fr/ordinarthur/freedge-frontend:latest
|
|
ports:
|
|
- containerPort: 80
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: freedge-proxy
|
|
namespace: freedge
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: freedge-proxy
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: freedge-proxy
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: proxy-config
|
|
mountPath: /etc/nginx/conf.d/default.conf
|
|
subPath: proxy.conf
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
volumes:
|
|
- name: proxy-config
|
|
configMap:
|
|
name: freedge-config
|