This commit is contained in:
2026-04-27 01:25:45 +08:00
parent 5ec4c38495
commit b00a0c40d8
3 changed files with 52 additions and 0 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# 运行 Web 控制台;抓取数据通过卷挂载到 /data见 docker-compose 说明
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -U pip setuptools wheel \
&& pip install --no-cache-dir -r requirements.txt
COPY telegram-scraper.py app_web.py ./
COPY templates ./templates/
EXPOSE 8000
CMD ["uvicorn", "app_web:app", "--host", "0.0.0.0", "--port", "8000"]