From ec7847dbeb4003478f2edf8054ee92fd41781e3a Mon Sep 17 00:00:00 2001 From: pdx Date: Wed, 11 Jun 2025 16:01:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=86=85=E5=AE=B9=201.=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9config.py.example=202.=20=E8=A1=A5=E5=85=85RE?= =?UTF-8?q?ADME.md=20README=5FEN.md=E4=B8=AD=20=20=E6=94=B9config.py.examp?= =?UTF-8?q?le=20copy=E6=88=90config.py=E7=9A=84=E5=90=AF=E5=8A=A8=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=203.=20=E5=A2=9E=E5=8A=A0README=5FEN.md=E4=B8=AD?= =?UTF-8?q?=E7=BC=BA=E5=B0=91=E7=9A=84docker=E5=90=AF=E5=8A=A8=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改config.py成config.py.example的好处 1. 防止敏感数据上传到公开仓库 2. 适配不同环境的隐私需求 3. 版本控制优化:减少无效文件变更 4. 最佳实践:行业通用的安全约定 Changes: 1. Modify `config.py.example`. 2. Add the command to copy `config.py.example` to `config.py` in `README.md` and `README_EN.md`. 3. Add the missing Docker start command in `README_EN.md`. Benefits of renaming `config.py` to `config.py.example`: 1. Prevent sensitive data from being uploaded to public repositories. 2. Adapt to privacy requirements of different environments. 3. Optimize version control: reduce unnecessary file changes. 4. Best practice: a common security convention in the industry. --- README.md | 3 +++ README_EN.md | 16 ++++++++++++++++ config/{config.py => config.py.example} | 0 3 files changed, 19 insertions(+) rename config/{config.py => config.py.example} (100%) diff --git a/README.md b/README.md index b1e470e..4d78c79 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,8 @@ git clone git@github.com:mimo-x/Code-Review-GPT-Gitlab.git cd Code-Review-GPT-Gitlab +cp ./config/config.py.example ./config/config.py + vim ./config/config.py docker run -d --network bridge --add-host=host.docker.internal:host-gateway -v ./config:/workspace/config -p 8080:80 --name codereview xuxin1/llmcodereview:latest @@ -195,6 +197,7 @@ pip install -r requirements.txt ``` 3.**修改配置文件** ```bash +cp ./config/config.py.example ./config/config.py vim config/config.py ``` diff --git a/README_EN.md b/README_EN.md index 25838ec..088067d 100644 --- a/README_EN.md +++ b/README_EN.md @@ -129,6 +129,21 @@ The default supported models are listed in the table below. # Usage 📖 ### install + +#### Run by Docker + +```bash +git clone git@github.com:mimo-x/Code-Review-GPT-Gitlab.git + +cd Code-Review-GPT-Gitlab + +cp ./config/config.py.example ./config/config.py + +vim ./config/config.py + +docker run -d --network bridge --add-host=host.docker.internal:host-gateway -v ./config:/workspace/config -p 8080:80 --name codereview xuxin1/llmcodereview:latest +``` + #### Run by Source code 1.**clone repo** ```bash @@ -140,6 +155,7 @@ pip install -r requirements.txt ``` 3.**modify config file** ```bash +cp ./config/config.py.example ./config/config.py vim config/config.py ``` 4.**run** diff --git a/config/config.py b/config/config.py.example similarity index 100% rename from config/config.py rename to config/config.py.example