Refactor Dockerfile for Python 3.13, enhance health check, and add server info retrieval. Implement LOAD DATA INFILE support in DatabaseManager for improved CSV import performance. Introduce script editor for SQL management with save and format functionalities. Update UI for database management and script editing, including status indicators and improved layout.

This commit is contained in:
2026-01-14 14:47:25 +08:00
parent f389c0722d
commit 866fc1cb06
127 changed files with 56470 additions and 94 deletions
+25 -8
View File
@@ -1,24 +1,41 @@
FROM python:3.11
# CapacityReport Dockerfile
# 容量报表处理系统 - 用于内网离线部署
FROM python:3.13-slim
LABEL maintainer="CapacityReport"
LABEL description="容量报表处理系统"
WORKDIR /app
# 复制依赖文件
# 安装系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libmariadb-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# 先复制依赖文件(利用缓存)
COPY requirements.txt ./
# 安装依赖
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
# 创建日志目录
RUN mkdir -p /var/log/supervisor /var/run
# 创建目录
RUN mkdir -p /var/log/supervisor /var/run /app/cache /app/static/lib
# 复制应用代码
COPY . .
# 设置启动脚本权限
RUN chmod +x /app/start.sh
RUN chmod +x /app/start.sh 2>/dev/null || true
# 暴露端口
EXPOSE 9081
# 使用启动脚本
CMD ["/app/start.sh"]
# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:9081/health || exit 1
# 启动命令
CMD ["supervisord", "-c", "/app/supervisord.conf"]