62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: mongodb
|
|
namespace: librechat
|
|
spec:
|
|
serviceName: mongodb
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: mongodb
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mongodb
|
|
spec:
|
|
containers:
|
|
- name: mongodb
|
|
image: mongo:7
|
|
ports:
|
|
- containerPort: 27017
|
|
env:
|
|
- name: MONGO_INITDB_ROOT_USERNAME
|
|
value: librechat
|
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: MONGO_PASSWORD
|
|
- name: MONGO_INITDB_DATABASE
|
|
value: LibreChat
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data/db
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- mongosh
|
|
- --eval
|
|
- "db.adminCommand('ping')"
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- mongosh
|
|
- --eval
|
|
- "db.adminCommand('ping')"
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: mongodb-data
|