apiVersion: apps/v1
kind: Deployment
metadata:
  name: eduroom-frontend-deployment
spec:
  selector:
    matchLabels:
      app: eduroom-frontend-deployment
  template:
    metadata:
      labels:
        app: eduroom-frontend-deployment
    spec:
      restartPolicy: Always
      containers:
      - name: eduroom-frontend-deployment
        image: asia.gcr.io/macbigduck/eduroom-frontend
        # resources:
        #   limits:
        #     memory: "128Mi"
        #     cpu: "500m"
        ports:
        - containerPort: 3000
        env:
            - name: NEXT_PUBLIC_ENTRYPOINT_URL
              valueFrom:
                configMapKeyRef:
                  name: prod-configmap
                  key: ENTRYPOINT_URL
                  optional: false
            - name: NEXT_PUBLIC_BACKEND_API
              valueFrom:
                configMapKeyRef:
                  name: prod-configmap
                  key: BACKEND_API
                  optional: false
            - name: NEXT_PUBLIC_GRADER_URL
              valueFrom:
                configMapKeyRef:
                  name: prod-configmap
                  key: CLIENT_URL
                  optional: false
            - name: NEXT_PUBLIC_CHAT_SERVER
              valueFrom:
                configMapKeyRef:
                  name: prod-configmap
                  key: CHAT_SERVER
                  optional: false
            - name: NEXT_PUBLIC_KAHOOT_URL
              valueFrom:
                configMapKeyRef:
                  name: prod-configmap
                  key: KAHOOT_URL
                  optional: false
