view deploy.yaml @ 4:e8e4fd6d5619

refactor
author drewp@bigasterisk.com
date Sun, 28 Jan 2024 16:01:00 -0800
parents 5a77696c6dab
children 32cfefe3155b
line wrap: on
line source

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

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