From 11fab3ebb29138adbfc2f07897a5ee024a6568bb Mon Sep 17 00:00:00 2001 From: liwei Date: Sat, 30 Mar 2024 11:22:12 +0800 Subject: [PATCH] docs: web and docker install update --- docs/install.md | 13 ++++++++----- docs/zh-TW/install.md | 13 ++++++++----- docs/zh/install.md | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/install.md b/docs/install.md index 7fe0421..697c77e 100644 --- a/docs/install.md +++ b/docs/install.md @@ -80,7 +80,7 @@ The Web version supports configuration through command line parameters or config ```sh $ ./gopeed.exe -h -Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: +Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: -A string Bind Address (default "0.0.0.0") -P int @@ -89,6 +89,8 @@ Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: API token, that can only be used when basic authentication is enabled. -c string Config file path (default "./config.json") + -d string + Storage directory -p string HTTP Basic Auth Password -u string @@ -103,7 +105,8 @@ It also supports configuration through configuration files. Create a `config.jso "port": 0, // Bind port (default 9999) "username": "", // HTTP Basic Auth Username (default "gopeed") "password": "", // HTTP Basic Auth Password - "token": "" // HTTP API token, it must be configured when using HTTP API in the case of enabling identity authentication + "token": "", // HTTP API token, it must be configured when using HTTP API in the case of enabling identity authentication + "storageDir": "" // Storage directory } ``` @@ -120,19 +123,19 @@ docker run --name gopeed -d -p 9999:9999 liwei2633/gopeed Mount the download directory ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads liwei2633/gopeed +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads liwei2633/gopeed ``` Mount the data directory ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed ``` If you need to enable identity authentication, you can pass command line parameters (refer to the previous section `Web Configuration`): ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed -u admin -p 123456 +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed -u admin -p 123456 ``` ## Command Line diff --git a/docs/zh-TW/install.md b/docs/zh-TW/install.md index 9bc86a6..5f32289 100644 --- a/docs/zh-TW/install.md +++ b/docs/zh-TW/install.md @@ -78,7 +78,7 @@ Web 版支援命令列參數或設定檔進行配置,命令列參數可以透 ```sh $ ./gopeed.exe -h -Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: +Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: -A string Bind Address (default "0.0.0.0") -P int @@ -87,6 +87,8 @@ Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: API token, that can only be used when basic authentication is enabled. -c string Config file path (default "./config.json") + -d string + Storage directory -p string HTTP Basic Auth Password -u string @@ -101,7 +103,8 @@ Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: "port": 0, // 綁定的連接埠(預設:9999) "username": "", // 服務身分認證使用者名,為空時不啟用身分認證 "password": "", // 服務認證密碼(預設:gopeed) - "token": "" // HTTP API 令牌,在啟用身分認證的情況下使用 HTTP API 時,必須設定令牌 + "token": "", // HTTP API 令牌,在啟用身分認證的情況下使用 HTTP API 時,必須設定令牌 + "storageDir": "" // 存储目錄 } ``` @@ -118,19 +121,19 @@ docker run --name gopeed -d -p 9999:9999 liwei2633/gopeed 掛載下載目錄 ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads liwei2633/gopeed +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads liwei2633/gopeed ``` 掛載資料目錄 ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed ``` 如果需要啟用身份認證,可以傳遞命令列參數(參考上一節`Web 設定`): ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed -u admin -p 123456 +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed -u admin -p 123456 ``` ## 命令列 diff --git a/docs/zh/install.md b/docs/zh/install.md index 54f8b50..c75be60 100644 --- a/docs/zh/install.md +++ b/docs/zh/install.md @@ -78,7 +78,7 @@ Web 版支持命令行参数或者配置文件进行配置,命令行参数可 ```sh $ ./gopeed.exe -h -Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: +Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: -A string Bind Address (default "0.0.0.0") -P int @@ -87,6 +87,8 @@ Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: API token, that can only be used when basic authentication is enabled. -c string Config file path (default "./config.json") + -d string + Storage directory -p string HTTP Basic Auth Password -u string @@ -101,7 +103,8 @@ Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe: "port": 0, // 绑定的端口(默认:9999) "username": "", // 服务身份认证用户名,为空时不启用身份认证 "password": "", // 服务身份认证密码(默认:gopeed) - "token": "" // HTTP API 令牌,在启用身份认证的情况下使用 HTTP API 时,必须配置令牌 + "token": "", // HTTP API 令牌,在启用身份认证的情况下使用 HTTP API 时,必须配置令牌 + "storageDir": "" // 存储目录 } ``` @@ -118,19 +121,19 @@ docker run --name gopeed -d -p 9999:9999 liwei2633/gopeed 挂载下载目录 ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads liwei2633/gopeed +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads liwei2633/gopeed ``` 挂载数据目录 ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed ``` 如果需要启用身份认证,可以传递命令行参数(参考上一节`Web 配置`): ```sh -docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/root/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed -u admin -p 123456 +docker run --name gopeed -d -p 9999:9999 -v /path/to/download:/app/Downloads -v /path/to/storage:/app/storage liwei2633/gopeed -u admin -p 123456 ``` ## 命令行