apiVersion: apps/v1
kind: Deployment
metadata:
  name: hermes-mcp
  namespace: fetcherpay
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: hermes-mcp
  template:
    metadata:
      labels:
        app: hermes-mcp
    spec:
      hostNetwork: true
      securityContext:
        runAsUser: 1000
        runAsGroup: 1000
        fsGroup: 1000
      containers:
        - name: hermes-mcp
          image: localhost:32000/hermes-mcp@sha256:1ada6f03a81ad53cd3b641b8934ae99e1a29651ac05f0bb7fbed790bb9f9d1ed
          imagePullPolicy: Always
          securityContext:
            allowPrivilegeEscalation: false
          ports:
            - containerPort: 3456
          env:
            - name: PORT
              value: "3456"
            - name: SERVER_URL
              value: "https://hermes.squaremcp.com"
            - name: MCP_API_KEY
              value: "114521f3f9e6858480d6269446a446ef"
            - name: YAHOO_EMAIL
              value: "gheron01@yahoo.com"
            - name: YAHOO_APP_PASSWORD
              value: "lzlleytmslxocxae"
            - name: FETCHERPAY_EMAIL
              value: "garfield.heron@fetcherpay.com"
            - name: FETCHERPAY_PASSWORD
              value: "onelove"
            - name: FETCHERPAY_IMAP_HOST
              value: "23.120.207.35"
            - name: FETCHERPAY_IMAP_PORT
              value: "30993"
            - name: FETCHERPAY_SMTP_HOST
              value: "23.120.207.35"
            - name: FETCHERPAY_SMTP_PORT
              value: "30587"
            - name: GARFIELD_EMAIL
              value: "garfield@fetcherpay.com"
            - name: GARFIELD_PASSWORD
              value: "onelove"
            - name: SALES_EMAIL
              value: "sales@fetcherpay.com"
            - name: SALES_PASSWORD
              value: "onelove"
            - name: LEADS_EMAIL
              value: "leads@fetcherpay.com"
            - name: LEADS_PASSWORD
              value: "onelove"
            - name: FOUNDER_EMAIL
              value: "founder@fetcherpay.com"
            - name: FOUNDER_PASSWORD
              value: "onelove"
            - name: OBSIDIAN_VAULT_PATH
              value: "/vaults"
            - name: SYNCTHING_URL
              value: "http://10.1.58.192:8384"
            - name: SYNCTHING_API_KEY
              value: "PRWss5jFKX7VaHRr5LcJnbJHyFWuWuMH"
            - name: SYNCTHING_FOLDER_ID
              value: "obsidian-vault"
            - name: GMAIL_EMAIL
              value: "garfield.heron@gmail.com"
            - name: GMAIL_APP_PASSWORD
              value: "ldmk duee movy hruy"
            - name: SQCP_GARFIELD_EMAIL
              value: "garfield@squaremcp.com"
            - name: SQCP_GARFIELD_PASSWORD
              value: "onelove"
            - name: SQCP_INFO_EMAIL
              value: "info@squaremcp.com"
            - name: SQCP_INFO_PASSWORD
              value: "onelove"
            - name: SQCP_SALES_EMAIL
              value: "sales@squaremcp.com"
            - name: SQCP_SALES_PASSWORD
              value: "onelove"
            - name: SQCP_SUPPORT_EMAIL
              value: "support@squaremcp.com"
            - name: SQCP_SUPPORT_PASSWORD
              value: "onelove"
            - name: SQCP_FOUNDER_EMAIL
              value: "founder@squaremcp.com"
            - name: SQCP_FOUNDER_PASSWORD
              value: "onelove"
            - name: SQCP_CONTACT_EMAIL
              value: "contact@squaremcp.com"
            - name: SQCP_CONTACT_PASSWORD
              value: "onelove"
            - name: SQCP_SMTP_HOST
              value: "smtp.azurecomm.net"
            - name: SQCP_SMTP_PORT
              value: "587"
            - name: SQCP_SMTP_USER
              value: "fetcherpay-comm-prod.628d0126-984a-436a-8920-fcc877f5481a.57af0299-f395-4cf7-8fc5-3017211b2879"
            - name: SQCP_SMTP_PASS
              value: "5SH8Q~aPvVVvFeSoXAfPB0MhDqNny_AwmjeQLbXf"
            - name: SQCP_ADMIN_EMAIL
              value: "admin@squaremcp.com"
            - name: SQCP_ADMIN_PASSWORD
              value: "onelove"
            - name: MYSQL_HOST
              value: "127.0.0.1"
            - name: MYSQL_PORT
              value: "3306"
            - name: MYSQL_USER
              value: "root"
            - name: MYSQL_PASSWORD
              value: "fetcherpay"
            - name: REDIS_URL
              value: "redis://:redis_secure_2024@10.152.183.80:6379"
            - name: CREDENTIAL_ENCRYPTION_KEY
              value: "4ef9c48e9f4e5dfa843d4bfcc3a8f69c5ad5738326c8b0e878076853ae4b8416"
            - name: JWT_SECRET
              value: "7a3f9d2e1c8b5a4f6e0d3c7b9a2e5f8d1c4b7a0e3f6d9c2b5a8e1f4d7c0b3a"
            - name: OAUTH_CLIENT_ID
              value: "fecb863c9aa334aba93c9017f4b9bee8"
            - name: OAUTH_CLIENT_SECRET
              value: "761c17a9a49670489ccf93ccffd344dbfc642ae994ac2ee991dbb42de3f6c3af"
            - name: SLACK_DEFAULT_BOT_TOKEN
              value: "xoxb-11134355044818-11132324783798-shAhtLsZT2GpTUI0pJlYsmrE"
            - name: WHATSAPP_DEFAULT_PHONE_NUMBER_ID
              value: "1075667822304648"
            - name: WHATSAPP_DEFAULT_WABA_ID
              value: "996304809563412"
            - name: WHATSAPP_DEFAULT_BUSINESS_ACCOUNT_ID
              value: "996304809563412"
            - name: TWILIO_ACCOUNT_SID
              value: "AC2a5ef8e87800b4fde36b577b76a4f1bf"
            - name: TWILIO_AUTH_TOKEN
              value: "bf9285c863263d06efbb1b56827d351a"
            - name: TWILIO_WHATSAPP_NUMBER
              value: "+19547385805"
            - name: PUBLIC_WEBHOOK_BASE_URL
              value: "https://hermes.squaremcp.com"
            - name: WHATSAPP_APP_SECRET
              value: "04d52724efa5f3ac5eb3f2b673c3d70a"
            - name: PILOT_CUSTOMER_ID
              value: "9a3f1a23-3080-4f9f-932c-02dae813ee96"
            - name: FACEBOOK_DEFAULT_ACCESS_TOKEN
              value: "EAAYG3FLDWzMBRgOmCM5GX7E3L6zk5utoZCn9eZAVvk0Ein6NaYtDZCtD5aMP3yMDnB0X2EoqvIYeOU77PhCCNaCve9LwX8iyQ2UsxsCajeHc7SXQL4EYWB7UEsDbcRA2gRF8GITYgbhBKKRlE3ehlwWBySwfxVexzMDgkGgz3ctzK4144hgJnE3LZB8EHP2FvolqNpXPVitexunWN0hxRwVXUSDgZCiOfzXfa1t0smxDs5wZDZD"
            - name: FACEBOOK_DEFAULT_PAGE_ID
              value: "1152192567968569"
            - name: INSTAGRAM_DEFAULT_ACCESS_TOKEN
              value: "EAAYG3FLDWzMBRgOmCM5GX7E3L6zk5utoZCn9eZAVvk0Ein6NaYtDZCtD5aMP3yMDnB0X2EoqvIYeOU77PhCCNaCve9LwX8iyQ2UsxsCajeHc7SXQL4EYWB7UEsDbcRA2gRF8GITYgbhBKKRlE3ehlwWBySwfxVexzMDgkGgz3ctzK4144hgJnE3LZB8EHP2FvolqNpXPVitexunWN0hxRwVXUSDgZCiOfzXfa1t0smxDs5wZDZD"
            - name: INSTAGRAM_DEFAULT_BUSINESS_ACCOUNT_ID
              value: "17841422623735880"
            - name: WHATSAPP_DEFAULT_ACCESS_TOKEN
              value: "EAAYG3FLDWzMBRV4qrRvksNnVzCI4wGUvF4R8jjy6pusWBxriRwP9B3ZCRcd3VpDsjoURhJMEQJiNZCcSIJZCcQGsusZANzTpQF9hWrhHgLXUU9tJZCuoEAWTUYA9C29JgQ9BPblpUxEQRKE3p9tZBsl9ChngJy45kXJ9apOYreJclyya0ebgCxZBmndBpCPuAZDZD"
            - name: WA_VERIFY_TOKEN
              value: "hermes-wa-2026"
            - name: SLACK_PILOT_WEBHOOK_URL
              value: "https://hooks.slack.com/services/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"
            - name: ANTHROPIC_API_KEY
              value: "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"
          volumeMounts:
            - name: vaults
              mountPath: /vaults
          readinessProbe:
            httpGet:
              path: /health
              port: 3456
            initialDelaySeconds: 5
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /health
              port: 3456
            initialDelaySeconds: 10
            periodSeconds: 30
      volumes:
        - name: vaults
          hostPath:
            path: /home/garfield/obsidian/vaults
            type: Directory
---
apiVersion: v1
kind: Service
metadata:
  name: hermes-mcp
  namespace: fetcherpay
spec:
  selector:
    app: hermes-mcp
  ports:
    - protocol: TCP
      port: 3456
      targetPort: 3456
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hermes-ingress
  namespace: fetcherpay
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-buffering: "off"
spec:
  ingressClassName: nginx
  rules:
    - host: hermes.squaremcp.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: hermes-mcp
                port:
                  number: 3456
  tls:
    - hosts:
        - hermes.squaremcp.com
      secretName: hermes-squaremcp-tls
