fix: 优化docker 镜像
This commit is contained in:
17
Dockerfile.crawler
Normal file
17
Dockerfile.crawler
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user