view deploy.yaml @ 1:f92cec01b59e

merge with template project
author drewp@bigasterisk.com
date Fri, 01 Sep 2023 23:57:45 -0700
parents 3989f073ed9e
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