---
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
  name: "deployment"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "lecture2gether"
  template:
    metadata:
      labels:
        app: "lecture2gether"
    spec:
      volumes:
        - name: "frontend-config"
          configMap:
            name: "frontend"

      containers:
        - image: "docker.io/thenerdful8/lecture2gether"
          imagePullPolicy: "Always"
          name: "main"
          ports:
            - name: "http"
              containerPort: 8000
            - name: "metrics"
              containerPort: 5000
          envFrom:
            - configMapRef: 
                name: "backend"
          volumeMounts:
            - name: "frontend-config"
              mountPath: "/app/config"
              readOnly: true
            
