apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: bookstack
  name: bookstack
spec:
  replicas: 1
  selector:
    matchLabels:
      app: bookstack
  template:
    metadata:
      labels:
        app: bookstack
    spec:
      containers:
      - env:
        - name: PUID
          value: "1000"
        - name: PGID
          value: "1000"
        - name: DB_HOST
          value: "mariadb"
        - name: DB_USER
          value: "root"
        - name: DB_PASS
          value: "password"
        - name: DB_DATABASE
          value: "bookstackapp"
        - name: APP_URL
          value: "http://bookstack.lan"
        image: linuxserver/bookstack:latest
        imagePullPolicy: Always
        name: bookstack
        ports:
        - containerPort: 80
        volumeMounts:
          - mountPath: /config
            name: bookstack
      restartPolicy: Always
      volumes:
        - name: bookstack
          persistentVolumeClaim:
            claimName: bookstack