apiVersion: apps/v1
kind: Deployment
metadata:
  name: certificate-explorer-db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: explorer-db
  template:
    metadata:
      labels:
        app: explorer-db
    spec:
      volumes:
        - name: fabricfiles
          persistentVolumeClaim:
            claimName: fabric-pvc

      containers:
        - name: postgres
          image: postgres:10.4-alpine
          imagePullPolicy: IfNotPresent
          env:
            - name: TZ
              value: 'America/Sao_Paulo'
            - name: DATABASE_DATABASE
              value: fabricexplorer
            - name: DATABASE_USERNAME
              value: hppoc
            - name: DATABASE_PASSWORD
              value: password
          volumeMounts:
            - mountPath: /fabric
              name: fabricfiles
