20 lines
486 B
Docker
20 lines
486 B
Docker
# Python 爬虫服务
|
|
# 国内服务器可加 --build-arg REGISTRY=docker.m.daocloud.io/library
|
|
ARG REGISTRY=
|
|
FROM ${REGISTRY}python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
COPY crawler/requirements.txt ./
|
|
RUN pip install --no-cache-dir -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"]
|