feat: 添加 Dockerfile、docker-compose 及 K8s kustomize 部署文件
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: graphrag-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "120"
|
||||
spec:
|
||||
rules:
|
||||
- host: graphrag-backend.plfai.cn
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: backend
|
||||
port:
|
||||
number: 8000
|
||||
- host: graphrag.plfai.cn
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: frontend
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: graphrag-prod
|
||||
|
||||
namePrefix: prod-
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
- namespace.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: graphrag-config
|
||||
behavior: replace
|
||||
literals:
|
||||
- DEEPSEEK_BASE_URL=https://api.deepseek.com
|
||||
- MINERU_PIPELINE=/app/mineru_mvp/pipeline.py
|
||||
- MINERU_PYTHON=/opt/venv/bin/python
|
||||
|
||||
secretGenerator:
|
||||
- name: graphrag-secrets
|
||||
behavior: replace
|
||||
literals:
|
||||
- DEEPSEEK_API_KEY=sk-prod-placeholder
|
||||
- MINERU_API_TOKEN=prod-placeholder
|
||||
|
||||
patches:
|
||||
- path: ingress.yaml
|
||||
- path: replicas-patch.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: graphrag-prod
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: backend
|
||||
spec:
|
||||
replicas: 2
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: graphrag-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "120"
|
||||
spec:
|
||||
rules:
|
||||
- host: test-graphrag-backend.plfai.cn
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: backend
|
||||
port:
|
||||
number: 8000
|
||||
- host: test-graphrag.plfai.cn
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: frontend
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,28 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: graphrag-test
|
||||
|
||||
namePrefix: test-
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
- namespace.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: graphrag-config
|
||||
behavior: replace
|
||||
literals:
|
||||
- DEEPSEEK_BASE_URL=https://api.deepseek.com
|
||||
- MINERU_PIPELINE=/app/mineru_mvp/pipeline.py
|
||||
- MINERU_PYTHON=/opt/venv/bin/python
|
||||
|
||||
secretGenerator:
|
||||
- name: graphrag-secrets
|
||||
behavior: replace
|
||||
literals:
|
||||
- DEEPSEEK_API_KEY=sk-test-placeholder
|
||||
- MINERU_API_TOKEN=test-placeholder
|
||||
|
||||
patches:
|
||||
- path: ingress.yaml
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: graphrag-test
|
||||
Reference in New Issue
Block a user