feat: add jellystat deployment, database service, and persistent volume claim configurations
This commit is contained in:
57
cluster/apps/jellystat/jellystat.yml
Normal file
57
cluster/apps/jellystat/jellystat.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: jellystat
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: jellystat
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: jellystat
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-for-db
|
||||
image: busybox
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
until nc -z -v -w30 jellystat-db-service 5432; do
|
||||
echo "Waiting for database to be ready..."
|
||||
sleep 2
|
||||
done
|
||||
containers:
|
||||
- name: jellystat
|
||||
image: cyfershepard/jellystat:1.1.5
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: "postgres"
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jellystat-secret
|
||||
key: password
|
||||
- name: POSTGRES_IP
|
||||
value: "jellystat-db-service"
|
||||
- name: POSTGRES_PORT
|
||||
value: "5432"
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: jellystat-secret
|
||||
key: jwt
|
||||
volumeMounts:
|
||||
- name: backup
|
||||
mountPath: /app/backend/backup-data
|
||||
subPath: backup
|
||||
volumes:
|
||||
- name: backup
|
||||
persistentVolumeClaim:
|
||||
claimName: longhorn-jellystat-backup
|
||||
|
||||
Reference in New Issue
Block a user