feat: 添加 Dockerfile、docker-compose 及 K8s kustomize 部署文件

This commit is contained in:
2026-06-15 16:49:35 +08:00
parent fd1bac551c
commit eeea55e9e4
18 changed files with 587 additions and 0 deletions
+29
View File
@@ -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
+29
View File
@@ -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
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: graphrag-prod
+6
View File
@@ -0,0 +1,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
replicas: 2
+29
View File
@@ -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
+28
View File
@@ -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
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: graphrag-test