apiVersion: apps/v1
kind: Deployment
metadata:
  name: message-dashboard-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: message-dashboard
  template:
    metadata:
      labels:
        component: message-dashboard
    spec:
      containers:
        - name: message-dashboard
          image: metalom/message-dashboard:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 3000
          env:
            - name: API_URL
              value: 'http://api.message.com'
          volumeMounts:
            - name: config-volume
              mountPath: /etc/nginx/conf.d/
      volumes:
        - name: config-volume
          configMap:
            name: message-dashboard-nginx-config
