Skip to content

Commit 29f1b7d

Browse files
committed
chore(docs): update documentations
1 parent 9a13ee6 commit 29f1b7d

File tree

9 files changed

+153
-3
lines changed

9 files changed

+153
-3
lines changed

docs/.vitepress/config/en.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
3838
{text: 'Nginx', link: '/guide/config-nginx'},
3939
{text: 'Open AI', link: '/guide/config-openai'},
4040
{text: 'Casdoor', link: '/guide/config-casdoor'},
41-
{text: 'Logrotate', link: '/guide/config-logrotate'}
41+
{text: 'Logrotate', link: '/guide/config-logrotate'},
42+
{text: 'Cluster', link: '/guide/config-cluster'}
4243
]
4344
},
4445
{

docs/.vitepress/config/zh_CN.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4343
{text: 'Nginx', link: '/zh_CN/guide/config-nginx'},
4444
{text: 'Open AI', link: '/zh_CN/guide/config-openai'},
4545
{text: 'Casdoor', link: '/zh_CN/guide/config-casdoor'},
46-
{text: 'Logrotate', link: '/zh_CN/guide/config-logrotate'}
46+
{text: 'Logrotate', link: '/zh_CN/guide/config-logrotate'},
47+
{text: '集群', link: '/zh_CN/guide/config-cluster'}
4748
]
4849
},
4950
{

docs/.vitepress/config/zh_TW.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
4242
{text: 'Nginx', link: '/zh_TW/guide/config-nginx'},
4343
{text: 'Open AI', link: '/zh_TW/guide/config-openai'},
4444
{text: 'Casdoor', link: '/zh_TW/guide/config-casdoor'},
45-
{text: 'Logrotate', link: '/zh_CN/guide/config-logrotate'}
45+
{text: 'Logrotate', link: '/zh_TW/guide/config-logrotate'},
46+
{text: '集群', link: '/zh_TW/guide/config-cluster'}
4647
]
4748
},
4849
{

docs/guide/config-cluster.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 集群
2+
From v2.0.0-beta.23, you can define multiple environments in the `cluster` section of the configuration file.
3+
4+
## Node
5+
- Type: `string`
6+
- Structure:`Scheme://Host(:Port)?name=ENV_NAME&node_secret=NODE_SECRET&enabled=(true/false)`
7+
- Example: `http://10.0.0.1:9000?name=node1&node_secret=my-node-secret&enabled=true`
8+
9+
If you have multiple environments to configure, please refer to the following configuration:
10+
```ini
11+
[cluster]
12+
Node = http://10.0.0.1:9000?name=node1&node_secret=my-node-secret&enabled=true
13+
Node = http://10.0.0.2:9000?name=node2&node_secret=my-node-secret&enabled=false
14+
Node = http://10.0.0.3?name=node3&node_secret=my-node-secret&enabled=true
15+
```
16+
17+
By default, Nginx UI will create the predefined environments during the bootstrapping stage.
18+
You can also find the "Load from Config" button in the environment list in the WebUI to manually update the environments.
19+
20+
In order to avoid conflicts with the environemnts that already exist in the database,
21+
Nginx UI will check if the `Scheme://Host(:Port)` part is unique.
22+
If it does not exist, it will be created according to the configuration, otherwise no action will be taken.
23+
24+
Please note that if you delete a node from the configuration file, Nginx UI will not delete the record from the database.

docs/guide/config-server.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ allows them to set a proxy for github.com to improve accessibility.
106106

107107
## CertRenewalInterval
108108

109+
- Version:`>= v2.0.0-beta.22`
109110
- Type: `int`
110111
- Default value: `7`
111112

@@ -114,9 +115,33 @@ By default, Nginx UI will automatically renew the certificate every 7 days.
114115

115116
## RecursiveNameservers
116117

118+
- Version:`>= v2.0.0-beta.22`
117119
- Type: `[]string`
118120
- Example: `8.8.8.8:53,1.1.1.1:53`
119121

120122
This option is used to set the recursive nameservers used by
121123
Nginx UI in the DNS challenge step of applying for a certificate.
122124
If this option is not configured, Nginx UI will use the nameservers settings of the operating system.
125+
126+
## SkipInstallation
127+
128+
- Version:`>= v2.0.0-beta.23`
129+
- Type: `bool`
130+
- Default value: `false`
131+
132+
You can skip the installation of the Nginx UI server by setting this option to `true`.
133+
This is useful when you want to deploy Nginx UI to multiple servers with
134+
a same configuration file or environment variables.
135+
136+
By default, if you enabled the skip installation mode without setting the `JWTSecret` and `NodeSecret` options
137+
in the server section, Nginx UI will generate a random UUID value for these two options.
138+
139+
Plus, if you don't set the `Email` option also in the server section,
140+
Nginx UI will not create a system initial acme user, this means you can't apply for an SSL certificate in this server.
141+
142+
## Name
143+
144+
- Version:`>= v2.0.0-beta.23`
145+
- Type: `string`
146+
147+
Use this option to customize the name of local server to be displayed in the environment indicator.

docs/zh_CN/guide/config-cluster.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 集群
2+
3+
自 v2.0.0-beta.23 起,您可以在配置文件的 `cluster` 分区中定义多个环境。
4+
5+
## Node
6+
- 类型: `string`
7+
- 结构:`Scheme://Host(:Port)?name=环境名称&node_secret=节点密钥&enabled=是否启用`
8+
- 示例: `http://10.0.0.1:9000?name=node1&node_secret=my-node-secret&enabled=true`
9+
10+
11+
如果您需要配置多个环境,请参考下面的配置:
12+
```ini
13+
[cluster]
14+
Node = http://10.0.0.1:9000?name=node1&node_secret=my-node-secret&enabled=true
15+
Node = http://10.0.0.2:9000?name=node2&node_secret=my-node-secret&enabled=false
16+
Node = http://10.0.0.3?name=node3&node_secret=my-node-secret&enabled=true
17+
```
18+
19+
默认情况下,Nginx UI 将在启动阶段执行环境的创建操作,您也可以在 WebUI 中的环境列表中找到「从配置中加载」按钮,手动更新环境。
20+
21+
为了避免与数据库内已经存在的环境冲突,Nginx UI 会检查 `Scheme://Host(:Port)` 部分是否应是否唯一,
22+
如果不存在,则按照配置进行创建,反之则不会进行任何操作。
23+
24+
注意:如果您删除了配置文件中的某个节点,Nginx UI 不会删除数据库中的记录。

docs/zh_CN/guide/config-server.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,38 @@ JWT 是一种用于验证用户身份的标准,它可以在用户登录后生
9797

9898
## CertRenewalInterval
9999

100+
- 版本:`>= v2.0.0-beta.22`
100101
- 类型:`int`
101102
- 默认值: `7`
102103

103104
此选项用于设置 Let's Encrypt 证书的自动续签间隔。默认情况下,Nginx UI 每隔 7 天会自动续签证书。
104105

105106
## RecursiveNameservers
106107

108+
- 版本:`>= v2.0.0-beta.22`
107109
- 类型: `[]string`
108110
- 示例: `8.8.8.8:53,1.1.1.1:53`
109111

110112
此选项用于设置 Nginx UI 在申请证书的 DNS 挑战步骤所使用的递归域名服务器。在不配置此项目的情况下,Nginx UI 使用操作系统的域名服务器设置。
113+
114+
## SkipInstallation
115+
116+
- 版本:`>= v2.0.0-beta.23`
117+
- 类型:`bool`
118+
- 默认值:`false`
119+
120+
通过将此选项设置为 `true`,您可以跳过 Nginx UI 服务器的安装。
121+
当您希望使用相同的配置文件或环境变量将 Nginx UI 部署到多个服务器时,这非常有用。
122+
123+
默认情况下,如果您启用了跳过安装模式,而没有在服务器部分设置 `JWTSecret``NodeSecret` 选项,
124+
Nginx UI 将为这两个选项生成一个随机的 UUID 值。
125+
126+
此外,如果您也没有在服务器部分设置 `Email` 选项,
127+
Nginx UI 将不会创建系统初始的 acme 用户,这意味着您无法在此服务器上申请 SSL 证书。
128+
129+
## Name
130+
131+
- 版本:`>= v2.0.0-beta.23`
132+
- 类型:`string`
133+
134+
使用此选项自定义本地服务器的名称,以在环境指示器中显示。

docs/zh_TW/guide/config-cluster.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 集群
2+
3+
自 v2.0.0-beta.23 起,您可以在配置文件的 `cluster` 分區中定義多個環境。
4+
5+
## Node
6+
7+
- 版本:`>= v2.0.0-beta.23`
8+
- 類型: `string`
9+
- 結構:`Scheme://Host(:Port)?name=環境名稱&node_secret=節點密鑰&enabled=是否啟用`
10+
- 範例: `http://10.0.0.1:9000?name=node1&node_secret=my-node-secret&enabled=true`
11+
12+
13+
如果您需要配置多個環境,請參考下面的配置:
14+
```ini
15+
[cluster]
16+
Node = http://10.0.0.1:9000?name=node1&node_secret=my-node-secret&enabled=true
17+
Node = http://10.0.0.2:9000?name=node2&node_secret=my-node-secret&enabled=false
18+
Node = http://10.0.0.3?name=node3&node_secret=my-node-secret&enabled=true
19+
```
20+
21+
預設情況下,Nginx UI 將在啟動階段執行環境的創建操作,您也可以在 WebUI 中的環境列表中找到「從配置中加載」按鈕,手動更新環境。
22+
23+
為了避免與資料庫內已經存在的環境衝突,Nginx UI 會檢查 Scheme://Host(:Port) 部分是否應是否唯一,
24+
如果不存在,則按照配置進行創建,反之則不會進行任何操作。
25+
26+
注意:如果您刪除了配置文件中的某個節點,Nginx UI 不會刪除資料庫中的記錄。

docs/zh_TW/guide/config-server.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,38 @@ JWT 是一種用於驗證用戶身份的標準,它可以在用戶登錄後生
9898

9999
## CertRenewalInterval
100100

101+
- 版本:`>= v2.0.0-beta.22`
101102
- 類型:`int`
102103
- 預設值: `7`
103104

104105
此選項用於設定 Let's Encrypt 證書的自動續簽間隔。預設情況下,Nginx UI 每隔 7 天會自動續簽證書。
105106

106107
## RecursiveNameservers
107108

109+
- 版本:`>= v2.0.0-beta.22`
108110
- 類型: `[]string`
109111
- 範例: `8.8.8.8:53,1.1.1.1:53`
110112

111113
此選項用於設定 Nginx UI 在申請證書的 DNS 挑戰步驟所使用的遞迴域名伺服器。在不配置此項目的情況下,Nginx UI 使用作業系統的域名伺服器設定。
114+
115+
## SkipInstallation
116+
117+
- 版本:`>= v2.0.0-beta.23`
118+
- 類型:`bool`
119+
- 預設值:`false`
120+
121+
透過將此選項設定為 `true`,您可以跳過 Nginx UI 伺服器的安裝。
122+
當您希望使用相同的配置文件或環境變數將 Nginx UI 部署到多個伺服器時,這非常有用。
123+
124+
預設情況下,如果您啟用了跳過安裝模式,而沒有在伺服器部分設定 `JWTSecret``NodeSecret` 選項,
125+
Nginx UI 將為這兩個選項生成一個隨機的 UUID 值。
126+
127+
此外,如果您也沒有在伺服器部分設定 `Email` 選項,
128+
Nginx UI 將不會創建系統初始的 acme 使用者,這意味著您無法在此伺服器上申請 SSL 證書。
129+
130+
## Name
131+
132+
- 版本:`>= v2.0.0-beta.23`
133+
- 類型:`string`
134+
135+
使用此選項自定義本地伺服器的名稱,以在環境指示器中顯示。

0 commit comments

Comments
 (0)