apiVersion: apps/v1
kind: Deployment
metadata:
  name: photoprism
  labels:
    app: photoprism
spec:
  selector:
    matchLabels:
      app: photoprism
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: photoprism
    spec:
      containers:
        - image: registry.homelab.dsb.dev/photoprism/photoprism-arm64:20210120
          imagePullPolicy: IfNotPresent
          name: photoprism
          readinessProbe:
            tcpSocket:
              port: 2342
          env:
            - name: PHOTOPRISM_ADMIN_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: admin.password
                  name: photoprism
            - name: PHOTOPRISM_SITE_URL
              value: https://photoprism.homelab.dsb.dev
            - name: PHOTOPRISM_DATABASE_DRIVER
              value: sqlite
            - name: PHOTOPRISM_TENSORFLOW_OFF
              value: "true"
            - name: PHOTOPRISM_EXPERIMENTAL
              value: "true"
            - name: PHOTOPRISM_WORKERS
              value: "4"
          resources:
            limits:
              memory: 4Gi
          volumeMounts:
            - mountPath: /photoprism/storage
              name: photoprism
              subPath: storage
            - mountPath: /photoprism/originals
              name: photoprism
              subPath: originals
      volumes:
        - name: photoprism
          persistentVolumeClaim:
            claimName: photoprism
