kind: PersistentVolume
apiVersion: v1
metadata:
  name: joget-pv-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 20Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: joget-pv-claim
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
---
apiVersion: v1
kind: Service
metadata:
 name: joget
 labels:
   app: joget
spec:
 ports:
 - port: 8080
 selector:
   app: joget
 type: NodePort
---
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
 name: joget
spec:
 selector:
   matchLabels:
     app: joget
 strategy:
   type: Recreate
 template:
   metadata:
     labels:
       app: joget
   spec:
     containers:
     - image: jogetworkflow/joget-enterprise
       name: joget
       resources:
          requests:
            cpu: "0.5"
            memory: "500Mi"
       env:
       - name: MYSQL_HOST
         value: mysql
       - name: MYSQL_PASSWORD
         value: password
       - name: MYSQL_PORT
         value: "3306"
       ports:
       - containerPort: 8080
         name: joget
       volumeMounts:
       - name: joget-persistent-storage
         mountPath: /opt/joget/wflow
     volumes:
     - name: joget-persistent-storage
       persistentVolumeClaim:
         claimName: joget-pv-claim
