apiVersion: apps/v1
kind: Deployment
metadata:
  name: nodejs
  labels:
    app.kubernetes.io/name: nodejs
    app.kubernetes.io/component: backend
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: nodejs
      app.kubernetes.io/component: backend
  replicas: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/name: nodejs
        app.kubernetes.io/component: backend
    spec:
      containers:
      - name: nodejs
        image: jennesnl/mern-api:latest
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 4000
        env:
          - name: MONGO_URL
            value: mongodb:27017/?compressors=zlib&gssapiServiceName=mongodb
          - name: IS_NODE
            value: "true"
          - name: PORT
            value: "4000"
          - name: JWT_SECRET
            value: 3f1d9f7c8b9eebcea072a9f4c33c1d8b0469af43c2ebdc06f6695180d5b013fc
          - name: NODE_ENV
            value: production
        imagePullPolicy: Always
