fix: 修复登录500错误和移除明文密码提示

- 修复 deps.py 中 get_vn_service 的引用错误 (vn_service.vn_service -> vn_service)
- 移除登录页面上的明文密码提示
- 改进前端错误处理,避免数据加载失败导致登录显示错误
This commit is contained in:
2026-07-02 12:23:55 +08:00
parent 3fbe6c9be5
commit 918bbed0fc
63 changed files with 16699 additions and 10 deletions
+71
View File
@@ -0,0 +1,71 @@
# Sanguo VeighNa Docker 镜像 - NAS 适配版
# 使用 Python 3.10Synology NAS 已有镜像)
# 单阶段构建,简化部署流程
FROM python:3.10-slim
# 设置环境变量
ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
VNPY_LOG_LEVEL=INFO \
TA_LIBRARY_PATH=/usr/local/lib \
TA_INCLUDE_PATH=/usr/local/include
# 安装运行时和编译依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
build-essential \
wget \
gcc \
g++ \
make \
libc6-dev \
&& rm -rf /var/lib/apt/lists/*
# 下载并编译 TA-Lib
RUN wget -q http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \
&& tar -xzf ta-lib-0.4.0-src.tar.gz \
&& cd ta-lib \
&& ./configure --prefix=/usr \
&& make \
&& make install \
&& cd .. \
&& rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
# 更新 ldconfig
RUN ldconfig
# 设置工作目录
WORKDIR /app
# 创建数据目录
RUN mkdir -p /app/data /app/logs /app/config /app/temp
# 复制 requirements 并安装依赖
COPY requirements-docker.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements-docker.txt
# 复制应用代码(包含所有 sanguo 模块)
COPY sanguo_web/ /app/sanguo_web/
COPY vnpy_v4.4.0/vnpy/ /app/vnpy/
COPY sanguo_trader/ /app/sanguo_trader/
COPY sanguo_research/ /app/sanguo_research/
COPY sanguo_data/ /app/sanguo_data/
COPY sanguo_common/ /app/sanguo_common/
# 复制启动脚本
COPY docker/entrypoint.sh /app/
RUN chmod +x /app/entrypoint.sh
# 暴露端口
EXPOSE 8000 8080
# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# 启动命令
ENTRYPOINT ["/app/entrypoint.sh"]