24 lines
617 B
Docker
24 lines
617 B
Docker
# 运行 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/
|
||
COPY static ./static/
|
||
|
||
EXPOSE 8000
|
||
|
||
CMD ["uvicorn", "app_web:app", "--host", "0.0.0.0", "--port", "8000"]
|