apiVersion: apps/v1
kind: Deployment
metadata:
  name: resto-demo-app-back
spec:
  selector:
    matchLabels:
      app: resto-demo-app-back
  template:
    metadata:
      labels:
        app: resto-demo-app-back
    spec:
      containers:
      - name: resto-demo-app-back
        image: ludovicm67/resto-demo-app-back
        imagePullPolicy: Always
        resources:
          requests:
            memory: "32Mi"
            cpu: "100m"
          limits:
            memory: "128Mi"
            cpu: "500m"
        readinessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 10
          periodSeconds: 15
        livenessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 10
          periodSeconds: 30
        env:
        - name: REDIS_HOST
          value: redis
        - name: REDIS_PORT
          value: "6379"
        - name: DEBUG
          value: express:*
        - name: NODE_TLS_REJECT_UNAUTHORIZED
          value: "0"
        ports:
        - containerPort: 3000
