18 lines
515 B
Docker
18 lines
515 B
Docker
# Python 爬虫服务(使用 DaoCloud 国内镜像源 + 清华 PyPI 源)
|
|
FROM docker.m.daocloud.io/library/python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
COPY crawler/requirements.txt ./
|
|
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
|
|
COPY crawler ./
|
|
|
|
ENV DB_PATH=/data/data.db
|
|
ENV API_BASE=http://api:3001
|
|
ENV CLEANER_AI_DISABLED=1
|
|
ENV GDELT_DISABLED=1
|
|
ENV RSS_INTERVAL_SEC=60
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "realtime_conflict_service:app", "--host", "0.0.0.0", "--port", "8000"]
|