feature: 对接deer-flow (#54)

feature: 对接deer-flow
This commit is contained in:
hhhhsc701
2025-11-04 20:30:40 +08:00
committed by GitHub
parent dc30b0d892
commit f3958f08d9
710 changed files with 112812 additions and 52 deletions

View File

@@ -1,3 +1,60 @@
{{- if .Values.global.deerFlow.enable }}
apiVersion: v1
kind: ConfigMap
metadata:
name: datamate-nginx-conf
data:
backend.conf: |
server {
listen 80;
server_name 0.0.0.0;
access_log /var/log/datamate/frontend/access.log main;
error_log /var/log/datamate/frontend/error.log notice;
client_max_body_size 1024M;
add_header Set-Cookie "NEXT_LOCALE=zh";
location /api/ {
proxy_pass http://datamate-backend:8080/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /chat {
proxy_pass http://deer-flow-frontend:3000/chat;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /_next {
proxy_pass http://deer-flow-frontend:3000/_next;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /deer-flow-backend/ {
proxy_pass http://deer-flow-backend:8000/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
if ($query_string ~* "_rsc=pmmii") {
proxy_pass http://deer-flow-frontend:3000;
break;
}
root /opt/frontend;
try_files $uri $uri/ /index.html;
}
}
{{- else }}
apiVersion: v1
kind: ConfigMap
metadata:
@@ -25,4 +82,4 @@ data:
try_files $uri $uri/ /index.html;
}
}
{{- end }}

View File

@@ -13,10 +13,11 @@ spec:
{{- include "frontend.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
checksum/nginx: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "frontend.labels" . | nindent 8 }}
{{- with .Values.podLabels }}