apiVersion: apps/v1
kind: Deployment
metadata:
  name: esp32-iot-server-express
  labels:
    component: espe32-iot-server-express
spec:
  replicas: 1
  selector:
    matchLabels:
      component: espe32-iot-server-express
  template:
    metadata:
      labels:
        component: espe32-iot-server-express
    spec:
      containers:
      - name: express
        image: bloveless/esp32-iot-server:0.0.5
        env:
        - name: APP_KEY
          valueFrom:
            secretKeyRef:
              name: environment-keys
              key: APP_KEY
        - name: APP_DEBUG
          value: "true"
        - name: DATABASE_URL
          valueFrom:
            secretKeyRef:
              name: environment-keys
              key: DATABASE_URL
        - name: MQTT_URL
          valueFrom:
            secretKeyRef:
              name: environment-keys
              key: MQTT_URL
        ports:
        - containerPort: 3000
