58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
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-data
|
|
|