You've already forked DataMate
feature: 对接deer-flow
This commit is contained in:
1
deployment/docker/datamate/.env.deer-flow.example
Normal file
1
deployment/docker/datamate/.env.deer-flow.example
Normal file
@@ -0,0 +1 @@
|
||||
NGINX_CONF=./backend-with-deer-flow.conf
|
||||
1
deployment/docker/datamate/.env.example
Normal file
1
deployment/docker/datamate/.env.example
Normal file
@@ -0,0 +1 @@
|
||||
NGINX_CONF=./backend.conf
|
||||
49
deployment/docker/datamate/backend-with-deer-flow.conf
Normal file
49
deployment/docker/datamate/backend-with-deer-flow.conf
Normal file
@@ -0,0 +1,49 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
21
deployment/docker/datamate/backend.conf
Normal file
21
deployment/docker/datamate/backend.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
|
||||
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 / {
|
||||
root /opt/frontend;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,6 @@ services:
|
||||
image: datamate-backend
|
||||
restart: on-failure
|
||||
privileged: true
|
||||
ports:
|
||||
- "8080"
|
||||
volumes:
|
||||
- dataset_volume:/dataset
|
||||
- flow_volume:/flow
|
||||
@@ -24,6 +22,7 @@ services:
|
||||
- "30000:80" # nodePort → hostPort
|
||||
volumes:
|
||||
- frontend_log_volume:/var/log/datamate/frontend
|
||||
- $NGINX_CONF:/etc/nginx/conf.d/backend.conf
|
||||
networks: [ datamate ]
|
||||
depends_on:
|
||||
- datamate-backend
|
||||
@@ -35,8 +34,6 @@ services:
|
||||
restart: on-failure
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ports:
|
||||
- "3306"
|
||||
command: |
|
||||
sh -c "
|
||||
chown mysql:mysql /var/log/datamate/database &&
|
||||
@@ -63,8 +60,6 @@ services:
|
||||
MYSQL_USER: "root"
|
||||
MYSQL_PASSWORD: "password"
|
||||
MYSQL_DATABASE: "datamate"
|
||||
ports:
|
||||
- "8081"
|
||||
command:
|
||||
- python
|
||||
- /opt/runtime/datamate/operator_runtime.py
|
||||
|
||||
Reference in New Issue
Block a user