From bef1bbdf3e16e5163bc563407bd7fd8f7da97d7a Mon Sep 17 00:00:00 2001 From: CKLogic Date: Fri, 10 May 2024 09:48:50 +0800 Subject: [PATCH] Update README with Detailed WebUI Service Launch Instructions (#694) ### What problem does this PR solve? Improve README by detailing Launch Service from Source section This commit enhances the README document by adding comprehensive steps for running the WebUI service in the 'Launch Service from Source' section. It aims to provide clearer guidance for users attempting to start the service from the source code, making the setup process more accessible and understandable. Key changes include: - Detailed instructions for setting up and running the WebUI service. - Necessary prerequisites for launching the service from source. This update ensures that users have all the information they need to successfully launch the service, improving the overall usability of our project. ### Type of change - [x] Documentation Update --- README.md | 23 +++++++++++++++++++++++ README_zh.md | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/README.md b/README.md index 677de694b..afa4951e9 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,29 @@ $ chmod +x ./entrypoint.sh $ bash ./entrypoint.sh ``` +7. Start the WebUI service +```bash +$ cd web +$ npm install --registry=https://registry.npmmirror.com --force +$ vim .umirc.ts +# Modify proxy.target to 127.0.0.1:9380 +$ npm run dev +``` + +8. Deploy the WebUI service +```bash +$ cd web +$ npm install --registry=https://registry.npmmirror.com --force +$ umi build +$ mkdir -p /ragflow/web +$ cp -r dist /ragflow/web +$ apt install nginx -y +$ cp ../docker/nginx/proxy.conf /etc/nginx +$ cp ../docker/nginx/nginx.conf /etc/nginx +$ cp ../docker/nginx/ragflow.conf /etc/nginx/conf.d +$ systemctl start nginx +``` + ## 📚 Documentation - [FAQ](./docs/faq.md) diff --git a/README_zh.md b/README_zh.md index 4b2f50920..3bb82ecab 100644 --- a/README_zh.md +++ b/README_zh.md @@ -247,7 +247,28 @@ $ docker compose -f docker-compose-base.yml up -d $ chmod +x ./entrypoint.sh $ bash ./entrypoint.sh ``` +7. 启动WebUI服务 +```bash +$ cd web +$ npm install --registry=https://registry.npmmirror.com --force +$ vim .umirc.ts +# 修改proxy.target为127.0.0.1:9380 +$ npm run dev +``` +8. 部署WebUI服务 +```bash +$ cd web +$ npm install --registry=https://registry.npmmirror.com --force +$ umi build +$ mkdir -p /ragflow/web +$ cp -r dist /ragflow/web +$ apt install nginx -y +$ cp ../docker/nginx/proxy.conf /etc/nginx +$ cp ../docker/nginx/nginx.conf /etc/nginx +$ cp ../docker/nginx/ragflow.conf /etc/nginx/conf.d +$ systemctl start nginx +``` ## 📚 技术文档 - [FAQ](./docs/faq.md)