111 lines
3.0 KiB
YAML
111 lines
3.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: librechat
|
|
namespace: librechat
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: librechat
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: librechat
|
|
spec:
|
|
initContainers:
|
|
- name: wait-for-mongodb
|
|
image: busybox:1.36
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z mongodb 27017; do
|
|
echo "Waiting for MongoDB..."; sleep 3;
|
|
done
|
|
- name: wait-for-meilisearch
|
|
image: busybox:1.36
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z meilisearch 7700; do
|
|
echo "Waiting for MeiliSearch..."; sleep 3;
|
|
done
|
|
containers:
|
|
- name: librechat
|
|
image: ghcr.io/danny-avila/librechat:latest
|
|
ports:
|
|
- containerPort: 3080
|
|
envFrom:
|
|
- configMapRef:
|
|
name: librechat-config
|
|
env:
|
|
- name: MONGO_URI
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: MONGO_URI
|
|
- name: MEILI_MASTER_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: MEILI_MASTER_KEY
|
|
- name: JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: JWT_SECRET
|
|
- name: JWT_REFRESH_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: JWT_REFRESH_SECRET
|
|
- name: CREDS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: CREDS_KEY
|
|
- name: CREDS_IV
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: CREDS_IV
|
|
- name: OPENAI_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: OPENAI_API_KEY
|
|
- name: ANTHROPIC_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: librechat-secrets
|
|
key: ANTHROPIC_API_KEY
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3080
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3080
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
volumeMounts:
|
|
- name: app-config
|
|
mountPath: /app/librechat.yaml
|
|
subPath: librechat.yaml
|
|
volumes:
|
|
- name: app-config
|
|
configMap:
|
|
name: librechat-app-config
|