apiVersion: apps/v1
kind: Deployment
metadata:
  name: curio-app
  namespace: curio
spec:
  replicas: 2
  selector:
    matchLabels:
      app: curio-app
  template:
    metadata:
      labels:
        app: curio-app
      annotations:
        redeploy-timestamp: "2026-05-25T21:43:00"
    spec:
      containers:
      - name: curio
        image: 192.168.8.250:5000/curio:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
        env:
        - name: DATABASE_URL
          value: "postgres://postgres:curio_secret@curio-db:5432/curio"
        - name: TEMPORAL_URL
          value: "temporal-frontend.ai-core.svc.cluster.local:7233"
        - name: TWILIO_ACCOUNT_SID
          value: "AC601e1962dc8417ddb3ae53cd8d865020"
        - name: TWILIO_API_KEY_SID
          value: "SK48dd3d06318997be3a809a6ef0cd761d"
        - name: TWILIO_API_KEY_SECRET
          value: "rN5RpKAbFVCv0G45ehluf1JbTWt2dgNW"
        - name: TWILIO_WHATSAPP_FROM
          value: "whatsapp:+14155238886"
        - name: TWILIO_AUTH_TOKEN
          value: "08a68571a251d6d62f60dc83fc725b5a"
        - name: PHYSICIAN_WHATSAPP_NUMBER
          value: "whatsapp:+918500176938"
        - name: ADMIN_WHATSAPP_NUMBER
          valueFrom:
            configMapKeyRef:
              name: whatsapp-config
              key: personal-number
        - name: USE_LOCAL_WHATSAPP
          value: "true"
        - name: LOCAL_WHATSAPP_URL
          value: "http://whatsapp-gateway.ai-agents.svc.cluster.local:5001/send-message"
        - name: ANTHROPIC_API_KEY
          value: "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"
        - name: LLM_MODEL
          value: "claude-3-haiku-20240307"
        livenessProbe:
          httpGet:
            path: /
            port: 3000
          initialDelaySeconds: 5
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /
            port: 3000
          initialDelaySeconds: 2
          periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: curio-app
  namespace: curio
spec:
  selector:
    app: curio-app
  ports:
  - port: 80
    targetPort: 3000
