Spaces:
Paused
Paused
File size: 1,117 Bytes
671aaae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# 使用合适的基础镜像
FROM ubuntu:20.04
# 更新并安装所需的依赖
RUN apt-get update && apt-get install -y \
mysql-server \
nginx \
nodejs \
npm \
python3-pip \
curl \
wget \
supervisor \
&& apt-get clean
# 设置工作目录
WORKDIR /ragflow
# 复制各个服务的文件
COPY ./web ./web
COPY ./api ./api
COPY ./conf ./conf
COPY ./deepdoc ./deepdoc
COPY ./rag ./rag
COPY ./agent ./agent
COPY ./graphrag ./graphrag
# 安装Web应用的依赖并构建
RUN cd ./web && npm install --force && npm run build
# 设置环境变量
ENV PYTHONPATH=/ragflow/
ENV HF_ENDPOINT=https://hf-mirror.com
# 复制nginx配置文件
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
COPY ./nginx/ragflow.conf /etc/nginx/conf.d/ragflow.conf
COPY ./nginx/proxy.conf /etc/nginx/proxy.conf
# 复制Supervisord配置文件
COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# 复制启动脚本
COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# 设置启动时执行的命令
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|