fix: add PVC for whatsapp session and expose qr via REST API
This commit is contained in:
parent
fed234e448
commit
81d191a516
|
|
@ -1,3 +1,16 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: whatsapp-auth-pvc
|
||||
namespace: ai-agents
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: longhorn
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
|
@ -38,6 +51,8 @@ spec:
|
|||
mountPath: /app
|
||||
- name: dshm
|
||||
mountPath: /dev/shm
|
||||
- name: auth-session
|
||||
mountPath: /app/.wwebjs_auth
|
||||
ports:
|
||||
- containerPort: 5001
|
||||
resources:
|
||||
|
|
@ -54,6 +69,9 @@ spec:
|
|||
emptyDir:
|
||||
medium: Memory
|
||||
sizeLimit: 1Gi
|
||||
- name: auth-session
|
||||
persistentVolumeClaim:
|
||||
claimName: whatsapp-auth-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ app.get('/api/status', (req, res) => {
|
|||
res.json({
|
||||
service: 'whatsapp-gateway',
|
||||
ready: isReady,
|
||||
authenticated: client.info ? true : false
|
||||
authenticated: client.info ? true : false,
|
||||
qr: currentQr
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue