zxsipola123456 commited on
Commit
671aaae
1 Parent(s): ab2ded1

Create Dockerfile

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