feat(deepdata): 引入修改密码、文件预览组件与清洗算子增强,deepflow 改名为 deep-flow
本次同步 09-12 至 09-28 的代码变更,主要内容: 新增功能 - 修改密码:后端新增 ChangePasswordRequest DTO 与UserController/UserService 对应接口,前端新增 ChangePasswordDialog 并在 Header 接入入口 - 文件预览组件重构:file-preview 目录拆分出 VideoPreview(支持 blobUrl 直传)、 ImagePreview、AudioPreview,index.tsx 统一调度各类型预览器 - 新增 my_ops 算子模块:markitdown_parser、mineru_pdf_parser、text_quality_evaluator - 新增 tools/minio-file-server MinIO 文件服务 功能增强 - 数据清洗:cleaning_task_service/scheduler/routes 重构, data_juicer_executor 与 wrapper 增强,OperatorTable/LogsTable/TaskDetail 同步调整 - 数据标注:annotation sync.py、project.py 接口与schema 更新 - 数据采集、算子市场、首页与菜单路由相关页面调整 - DataJuicer 算子接入(useOperatorOperations、dj_ops_schema) 结构调整 - deepflow/ 更名为 deep-flow/(419 个文件重命名) - 新增 helm 部署编排、GitHub Actions 之外的自建镜像构建脚本 未纳入本次提交 - scripts-backup/、runtime/python-executor-backup/、components_backup/(备份目录) - *.backup*、__pycache__ 产物 - zh_core_web_sm-3.8.0-py3-none-any.whl(46MB 构建产物) - DataX/(内嵌独立仓库,远程亦未收录其源码)
This commit is contained in:
@@ -1,41 +1,45 @@
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY frontend ./
|
||||
|
||||
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi && \
|
||||
npm run build
|
||||
|
||||
FROM nginx:1.29 AS runner
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
--mount=type=cache,target=/var/lib/apt \
|
||||
apt update \
|
||||
&& apt install -y dos2unix python3 python3-dev python3-venv libaugeas-dev gcc vim cron \
|
||||
&& python3 -m venv /opt/certbot/ \
|
||||
&& /opt/certbot/bin/pip install --upgrade pip \
|
||||
&& /opt/certbot/bin/pip install certbot certbot-nginx \
|
||||
&& ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot
|
||||
|
||||
COPY --from=builder /app/dist /opt/frontend/statics
|
||||
COPY scripts/images/frontend/routes.inc /opt/frontend/routes.inc
|
||||
COPY scripts/images/frontend/http_backend.conf /opt/frontend/http_backend.conf
|
||||
COPY scripts/images/frontend/https_backend.conf /opt/frontend/https_backend.conf
|
||||
COPY scripts/images/frontend/nginx.conf /opt/frontend/nginx.conf
|
||||
COPY scripts/images/frontend/rotate-nginx-logs.sh /usr/local/bin/rotate-nginx-logs.sh
|
||||
|
||||
COPY scripts/images/frontend/start.sh /opt/frontend/start.sh
|
||||
|
||||
RUN dos2unix /opt/frontend/start.sh \
|
||||
&& dos2unix /usr/local/bin/rotate-nginx-logs.sh \
|
||||
&& chmod +x /opt/frontend/start.sh \
|
||||
&& chmod +x /usr/local/bin/rotate-nginx-logs.sh \
|
||||
&& mkdir -p /etc/nginx/cert \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& rm -f /etc/nginx/nginx.conf \
|
||||
&& rm -f /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["/opt/frontend/start.sh"]
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 🚀 优化 1:先只拷贝 package 文件并安装依赖,利用 Docker 层缓存
|
||||
# 只要 package.json 没变,这层就缓存,无需每次重新 npm ci
|
||||
COPY frontend/package*.json ./
|
||||
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
|
||||
|
||||
# 🚀 优化 2:再拷贝剩余源码,构建
|
||||
COPY frontend ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.29 AS runner
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
--mount=type=cache,target=/var/lib/apt \
|
||||
apt update \
|
||||
&& apt install -y dos2unix python3 python3-dev python3-venv libaugeas-dev gcc vim cron \
|
||||
&& python3 -m venv /opt/certbot/ \
|
||||
&& /opt/certbot/bin/pip install --upgrade pip \
|
||||
&& /opt/certbot/bin/pip install certbot certbot-nginx \
|
||||
&& ln -s /opt/certbot/bin/certbot /usr/local/bin/certbot
|
||||
|
||||
COPY --from=builder /app/dist /opt/frontend/statics
|
||||
COPY scripts/images/frontend/routes.inc /opt/frontend/routes.inc
|
||||
COPY scripts/images/frontend/http_backend.conf /opt/frontend/http_backend.conf
|
||||
COPY scripts/images/frontend/https_backend.conf /opt/frontend/https_backend.conf
|
||||
COPY scripts/images/frontend/nginx.conf /opt/frontend/nginx.conf
|
||||
COPY scripts/images/frontend/rotate-nginx-logs.sh /usr/local/bin/rotate-nginx-logs.sh
|
||||
|
||||
COPY scripts/images/frontend/start.sh /opt/frontend/start.sh
|
||||
|
||||
RUN dos2unix /opt/frontend/start.sh \
|
||||
&& dos2unix /usr/local/bin/rotate-nginx-logs.sh \
|
||||
&& chmod +x /opt/frontend/start.sh \
|
||||
&& chmod +x /usr/local/bin/rotate-nginx-logs.sh \
|
||||
&& mkdir -p /etc/nginx/cert \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& rm -f /etc/nginx/nginx.conf \
|
||||
&& rm -f /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["/opt/frontend/start.sh"]
|
||||
|
||||
@@ -1,48 +1,40 @@
|
||||
location /api/ {
|
||||
proxy_pass http://deepdata-gateway: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://deepdata-gateway:8080/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;
|
||||
|
||||
proxy_intercept_errors on;
|
||||
error_page 500 501 502 503 504 =200 @static_fallback;
|
||||
}
|
||||
|
||||
location /_next {
|
||||
proxy_pass http://deepdata-gateway:8080/_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 /deepflow-backend {
|
||||
proxy_pass http://deepdata-gateway:8080/deepflow-backend;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
# Casdoor SSO 前端配置端点(无 /api 前缀,供登录弹窗探测 SSO 是否启用)
|
||||
location = /sso/casdoor/config {
|
||||
proxy_pass http://deepdata-gateway:8080/sso/casdoor/config;
|
||||
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 @static_fallback {
|
||||
root /opt/frontend/statics;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /opt/frontend/statics;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
location /api/ {
|
||||
proxy_pass http://deepdata-gateway: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://deepdata-gateway:8080/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;
|
||||
|
||||
proxy_intercept_errors on;
|
||||
error_page 500 501 502 503 504 =200 @static_fallback;
|
||||
}
|
||||
|
||||
location /_next {
|
||||
proxy_pass http://deepdata-gateway:8080/_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 /deep-flow-backend {
|
||||
proxy_pass http://deepdata-gateway:8080/deep-flow-backend;
|
||||
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 @static_fallback {
|
||||
root /opt/frontend/statics;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /opt/frontend/statics;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user