0
|
1 apiVersion: apps/v1
|
|
2 kind: Deployment
|
|
3 metadata:
|
|
4 name: light-bridge
|
|
5 spec:
|
|
6 replicas: 1
|
|
7 selector:
|
|
8 matchLabels:
|
|
9 app: light-bridge
|
|
10 template:
|
|
11 metadata:
|
|
12 labels:
|
|
13 app: light-bridge
|
|
14 spec:
|
|
15
|
|
16 volumes:
|
|
17 - name: nginx-conf
|
|
18 configMap:
|
|
19 name: light-bridge-nginx-conf
|
|
20 containers:
|
|
21 - name: proxy
|
|
22 image: docker.io/nginx:1.21.6
|
|
23 ports:
|
|
24 - containerPort: 80
|
|
25 volumeMounts:
|
|
26 - { name: nginx-conf, mountPath: "/etc/nginx/" }
|
|
27 - name: light-bridge-vite
|
|
28 image: reg:5000/light_bridge_image
|
|
29 ports:
|
|
30 - containerPort: 8002
|
|
31 command:
|
|
32 - pnpm
|
|
33 - exec
|
|
34 - vite
|
|
35 - --port=8002
|
|
36 - name: light-bridge-py
|
|
37 image: reg:5000/light_bridge_image
|
|
38 ports:
|
|
39 - containerPort: 8001
|
|
40 command:
|
|
41 - pdm
|
|
42 - run
|
|
43 - uvicorn
|
|
44 - '--port=8001'
|
|
45 - '--host=0.0.0.0'
|
|
46 - '--reload'
|
|
47 - 'light_bridge:app'
|
|
48 ---
|
|
49 apiVersion: v1
|
|
50 kind: Service
|
|
51 metadata:
|
|
52 name: light-bridge
|
|
53 spec:
|
|
54 ports:
|
|
55 - {port: 80, targetPort: 80}
|
|
56 selector:
|
|
57 app: light-bridge
|