---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: wallabag
  namespace: wallabag
  labels:
    app: wallabag
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wallabag
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wallabag
    spec:
      containers:
        - name: wallabag
          image: wallabag/wallabag:2.4.2
          imagePullPolicy: IfNotPresent
          env:
            - name: TZ
              value: Europe/Zurich
            - name: SYMFONY__ENV__DOMAIN_NAME
              value: https://wallabag.${BASE_DOMAIN}
            - name: SYMFONY__ENV__SERVER_NAME
              value: wallabag
            - name: SYMFONY__ENV__FOSUSER_REGISTRATION
              value: "False"
            - name: SYMFONY__ENV__FOSUSER_CONFIRMATION
              value: "False"
          envFrom:
            - secretRef:
                name: wallabag-symfony
          resources: {}
          ports:
            - name: http
              containerPort: 80
          volumeMounts:
            - mountPath: /var/www/wallabag/data
              name: wallabag-data
      restartPolicy: Always
      automountServiceAccountToken: false
      volumes:
        - name: wallabag-data
          persistentVolumeClaim:
            claimName: wallabag-data
