update mcp param key

This commit is contained in:
Liujian committed 2025-10-17 10:13:19 +08:00
1 parent c1b224af46
commit e8aaeefe85
6 files changed
+91 -9

No files matched your search

+1
View File
@@ -0,0 +1 @@
/mysql/
+3 -2
View File
@@ -3,7 +3,7 @@
# Description: Dockerfile for XPack
FROM python:3.12.11-alpine3.22
RUN apk add nodejs=~22 npm uv
RUN apk add nodejs=~22 npm uv nginx
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
@@ -18,10 +18,11 @@ COPY requirements.txt /$APP/requirements.txt
RUN uv venv && source .venv/bin/activate && uv pip install -r requirements.txt
RUN echo $VERSION > .version
COPY scripts/resource/default.conf /etc/nginx/http.d/default.conf
COPY frontend/out/ /$APP/frontend
COPY scripts/resource/ /$APP
COPY pyproject.toml /$APP/pyproject.toml
COPY services/ /$APP/services
CMD [ "./start.sh" ]
-1
View File
@@ -72,7 +72,6 @@ clean_build_cache() {
frontend_build() {
echo_info "Begin frontend build..."
cd "${FRONTEND_DIR}" || exit 1
export NEXT_PUBLIC_API_URL=http://127.0.0.1:8001
echo_debug "Running command: pnpm install --frozen-lockfile"
pnpm install --frozen-lockfile || exit 1
+79
View File
@@ -0,0 +1,79 @@
# This is a default site configuration which will simply return 404, preventing
# chance access to any other virtualhost.
server {
listen 80 default_server;
listen [::]:80 default_server;
location ^~ / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name off;
proxy_ssl_name $proxy_host;
}
location ^~ /uploads {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name off;
proxy_ssl_name $proxy_host;
}
location ^~ /mcp {
proxy_pass http://127.0.0.1:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name off;
proxy_ssl_name $proxy_host;
}
location ^~ /api {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name off;
proxy_ssl_name $proxy_host;
}
# You may need this to prevent return 404 recursion.
location = /404.html {
internal;
}
}
+4 -4
View File
@@ -32,9 +32,9 @@ SET headers = CASE
ELSE JSON_ARRAY()
END;
ALTER TABLE `mcp_service` DROP COLUMN `auth_method`;
ALTER TABLE `mcp_service` DROP COLUMN `auth_header`;
ALTER TABLE `mcp_service` DROP COLUMN `auth_token`;
-- ALTER TABLE `mcp_service` DROP COLUMN `auth_method`;
-- ALTER TABLE `mcp_service` DROP COLUMN `auth_header`;
-- ALTER TABLE `mcp_service` DROP COLUMN `auth_token`;
CREATE TABLE `onboarding_task` (
@@ -73,7 +73,7 @@ ALTER TABLE `temp_mcp_service` MODIFY COLUMN `output_token_price` decimal(10, 2)
ALTER TABLE `user` MODIFY COLUMN `role_id` int NOT NULL COMMENT '角色 ID:0:未确定、1(租户)、2(租户下的普通用户)' AFTER `register_type`;
DELETE FROM sys_config WHERE `key` = "mcp_server_prefix"
DELETE FROM sys_config WHERE `key` = "mcp_server_prefix";
INSERT INTO `sys_config` (`id`,`key`, `value`,`description`,`created_at`,`updated_at`)
VALUES ('xpack-version','version', '1.1.0', 'User wallet history max count', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
+4 -2
View File
@@ -39,9 +39,11 @@ nohup uvicorn services.admin_service.main:app --host 0.0.0.0 --port 8001 --reloa
sleep 5s
nohup uvicorn services.api_service.main:app --host 0.0.0.0 --port 8002 --reload > ${LOG_DIR}/api_service.log 2>&1 &
cd frontend/ && nohup node server.js > ${LOG_DIR}//frontend.log 2>&1 &
HOSTNAME=""
cd frontend/ && nohup node server.js> ${LOG_DIR}//frontend.log 2>&1 &
sleep 2s
nginx
tail -F ${LOG_DIR}/*.log