apiVersion: apps/v1
kind: Deployment
metadata:
  name: bitwarden
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: bitwarden
  template:
    metadata:
      labels:
        app: bitwarden
    spec:
      containers:
        - name: bitwarden
          image: bitwardenrs/server-postgresql
          imagePullPolicy: "IfNotPresent"
          ports:
            - containerPort: 80
          envFrom:
            - secretRef:
                name: bitwarden
          env:
            - name: RUST_BACKTRACE
              value: "1"
            - name: ENABLE_DB_WAL
              value: "false"
          volumeMounts:
            - mountPath: /data
              name: data
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: bitwarden-pvc
