apiVersion: apps/v1
kind: Deployment
metadata:
  name: cpapp
  labels:
    app: cpapp
    version: v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cpapp
      version: v1
  template:
    metadata:
      labels:
        app: cpapp
        version: v1
    spec:
      containers:
      - name: cpapp
        image: alunde/cpapp:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 4004
        env:
        - name: DEBUG
          value: "sqlite"
        volumeMounts:
          - name: cpappdb
            mountPath: /usr/src/app/app/var/tmp
      volumes:
        - name: cpappdb
          persistentVolumeClaim:
            claimName: cpapp-data
