File size: 482 Bytes
efd8f02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM python:3.10-slim-bullseye

# 安装必要的系统依赖
# DrissionPage 需要浏览器才能工作
RUN apt-get update && apt-get install -y \

  chromium \
  chromium-driver \
  && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# 复制项目文件
COPY . .

# 安装 Python 依赖
RUN pip install --no-cache-dir \

  flask \
  python-dotenv \
  DrissionPage \
  requests

# 暴露端口
ENV PORT=7860
EXPOSE 7860

# 运行应用
CMD ["python", "app.py"]