view deploy.yaml @ 0:3989f073ed9e

start. hardcoded motion light in garage
author drewp@bigasterisk.com
date Thu, 24 Aug 2023 16:28:05 -0700
parents
children 0cc41259fddd
line wrap: on
line source

apiVersion: apps/v1
kind: Deployment
metadata:
  name: pi-mqtt
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pi-mqtt
  template:
    metadata:
      labels:
        app: pi-mqtt
    spec:

      volumes:
        - name: nginx-conf
          configMap:
            name: pi-mqtt-nginx-conf
      containers:
        - name: proxy
          image: docker.io/nginx:1.21.6
          ports:
            - containerPort: 80
          volumeMounts:
            - { name: nginx-conf, mountPath: "/etc/nginx/" }
        - name: pi-mqtt-vite
          image: reg:5000/pi_mqtt_image
          ports:
            - containerPort: 8002
          command:
            - pnpm
            - exec
            - vite
            - --port=8002
        - name: pi-mqtt-py
          image: reg:5000/pi_mqtt_image
          ports:
            - containerPort: 8001
          command:
          - pdm
          - run
          - uvicorn
          - '--port=8001'
          - '--host=0.0.0.0'
          - '--reload'
          - 'pi_mqtt:app'
---
apiVersion: v1
kind: Service
metadata:
  name: pi-mqtt
spec:
  ports:
  - {port: 80, targetPort: 80}
  selector:
    app: pi-mqtt