mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-19 21:00:52 +08:00
Update README
This commit is contained in:
18
README.md
18
README.md
@@ -497,15 +497,27 @@ docker run --rm -p 8317:8317 -v /path/to/your/config.yaml:/CLIProxyAPI/config.ya
|
||||
|
||||
## Run with Docker Compose
|
||||
|
||||
1. Clone the repository:
|
||||
1. Clone the repository and navigate into the directory:
|
||||
```bash
|
||||
git clone https://github.com/luispater/CLIProxyAPI.git
|
||||
cd CLIProxyAPI
|
||||
```
|
||||
|
||||
2. Create a `config.yaml` from `config.example.yaml` and customize it.
|
||||
2. Prepare the configuration file:
|
||||
Create a `config.yaml` file by copying the example and customize it to your needs.
|
||||
```bash
|
||||
cp config.example.yaml config.yaml
|
||||
```
|
||||
*(Note for Windows users: You can use `copy config.example.yaml config.yaml` in CMD or PowerShell.)*
|
||||
|
||||
3. Run the interactive script to start the service:
|
||||
3. Start the service:
|
||||
- **For most users (recommended):**
|
||||
Run the following command to start the service using the pre-built image from Docker Hub. The service will run in the background.
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
- **For advanced users:**
|
||||
If you have modified the source code and need to build a new image, use the interactive helper scripts:
|
||||
- For Windows (PowerShell):
|
||||
```powershell
|
||||
.\docker-build.ps1
|
||||
|
||||
22
README_CN.md
22
README_CN.md
@@ -512,20 +512,32 @@ docker run --rm -p 8317:8317 -v /path/to/your/config.yaml:/CLIProxyAPI/config.ya
|
||||
|
||||
## 使用 Docker Compose 运行
|
||||
|
||||
1. 克隆仓库:
|
||||
1. 克隆仓库并进入目录:
|
||||
```bash
|
||||
git clone https://github.com/luispater/CLIProxyAPI.git
|
||||
cd CLIProxyAPI
|
||||
```
|
||||
|
||||
2. 从 `config.example.yaml` 创建一个 `config.yaml` 文件并进行自定义。
|
||||
2. 准备配置文件:
|
||||
通过复制示例文件来创建 `config.yaml` 文件,并根据您的需求进行自定义。
|
||||
```bash
|
||||
cp config.example.yaml config.yaml
|
||||
```
|
||||
*(Windows 用户请注意:您可以在 CMD 或 PowerShell 中使用 `copy config.example.yaml config.yaml`。)*
|
||||
|
||||
3. 运行交互式脚本以启动服务:
|
||||
- Windows (PowerShell):
|
||||
3. 启动服务:
|
||||
- **适用于大多数用户(推荐):**
|
||||
运行以下命令,使用 Docker Hub 上的预构建镜像启动服务。服务将在后台运行。
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
- **适用于进阶用户:**
|
||||
如果您修改了源代码并需要构建新镜像,请使用交互式辅助脚本:
|
||||
- 对于 Windows (PowerShell):
|
||||
```powershell
|
||||
.\docker-build.ps1
|
||||
```
|
||||
- Linux/macOS:
|
||||
- 对于 Linux/macOS:
|
||||
```bash
|
||||
bash docker-build.sh
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user