apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-prod
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: nginx-prod
  template:
    metadata:
      labels:
        app: nginx-prod
    spec:
      containers:
      - env:
        - name: APP_ENV
          valueFrom:
            configMapKeyRef:
              key: APP_ENV
              name: nginx-prod-env
        image: fiser/base-docker-microservices:nginx-prod
        name: nginx-server-prod
        ports:
        - containerPort: 80
        resources: {}
        volumeMounts:
        - mountPath: /var/log/nginx
          name: nginx-prod-claim2
      restartPolicy: Always
      volumes:
      - name: nginx-prod-claim2
        persistentVolumeClaim:
          claimName: nginx-prod-claim2