diff deploy.yaml @ 0:5a77696c6dab

start
author drewp@bigasterisk.com
date Sun, 28 Jan 2024 15:32:18 -0800
parents
children 32cfefe3155b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy.yaml	Sun Jan 28 15:32:18 2024 -0800
@@ -0,0 +1,57 @@
+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