espocrm / espocrm-docker

Official Docker Image for EspoCRM
https://hub.docker.com/r/espocrm/espocrm
GNU Affero General Public License v3.0
56 stars 34 forks source link

Deployment via Kubernetes #16

Open oluomotoso opened 1 year ago

oluomotoso commented 1 year ago

Hello Team,

Thanks for packaging this together. I have tried using the docker directly on Kubernetes but its not been working no matter what I do.

this is an example of my statefulset but its returning 504 error when I try to access the service

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: watuespocrm
  labels:
    tier: backend
spec:
  replicas: 1
  serviceName: "watuespocrm"
  selector:
    matchLabels:
      app: watuespocrm
  template:
    metadata:
      labels:
        app: watuespocrm
    spec:
      containers:
        - name: watu-espocrm
          image: espocrm/espocrm:fpm-alpine
          ports:
            - containerPort: 80
              name: http
          volumeMounts:
            - name: espo-crm-volume
              mountPath: "/var/www/html"
          env:
            - name: ESPOCRM_DATABASE_HOST
              value: ${DB_HOST}:${DB_PORT}
            - name: ESPOCRM_DATABASE_USER
              value: ${DB_USERNAME}
            - name: ESPOCRM_DATABASE_PASSWORD
              value: ${DB_PASSWORD}
            - name: ESPOCRM_ADMIN_USERNAME
              value: "admin"
            - name: ESPOCRM_ADMIN_PASSWORD
              value: "adminPassword"
            - name: ESPOCRM_SITE_URL
              value: "https://espocrm.watu.global"
        - name: watu-espocrm-daemon
          image: espocrm/espocrm:fpm-alpine
          volumeMounts:
            - mountPath: "/var/www/html"
              name: "espo-crm-volume"
          command: ["docker-daemon.sh"]
        - name: watu-espocrm-websocket
          image: espocrm/espocrm:fpm-alpine
          ports:
            - containerPort: 8080
          volumeMounts:
            - mountPath: "/var/www/html"
              name: "espo-crm-volume"
          command: ["docker-websocket.sh"]
      restartPolicy: Always
  volumeClaimTemplates:
    - metadata:
        name: espo-crm-volume
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 5Gi
        storageClassName: do-block-storage
Dan6erbond commented 1 year ago

Getting the same issue and all I see is "Instance is not ready: waiting for the upgrade" in the logs.