ADD: 增加港股支持 增加Dockerfile

This commit is contained in:
兰志宏
2025-03-01 21:46:26 +08:00
parent b0180b25d5
commit 1029a7eb07
9 changed files with 297 additions and 1458 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
# 使用 Python 3.9 作为基础镜像
FROM python:3.10-slim
# 设置工作目录
WORKDIR /app
# 安装系统依赖
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 复制项目文件
COPY . /app/
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install akshare --upgrade -i https://pypi.org/simple
# 设置环境变量
ENV PYTHONPATH=/app
# 暴露端口(如果需要)
EXPOSE 8888
# 启动命令
CMD ["python", "web_server.py"]