Browse Source

chore: update docs

Jacky 1 week ago
parent
commit
d079e805e5
3 changed files with 58 additions and 14 deletions
  1. 20 6
      docs/guide/config-nginx.md
  2. 18 4
      docs/zh_CN/guide/config-nginx.md
  3. 20 4
      docs/zh_TW/guide/config-nginx.md

+ 20 - 6
docs/guide/config-nginx.md

@@ -101,18 +101,12 @@ If the `--sbin-path` path cannot be obtained from `nginx -V`, Nginx UI will use
 nginx
 ```
 
-
-
 If the `--sbin-path` path can be obtained, Nginx UI will use the following command to start the Nginx service:
 
 ```bash
 start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
 ```
 
-## Stub Status
-
-In this section, we will introduce configuration options in Nginx UI for the Nginx stub status module.
-
 ### StubStatusPort
 - Type: `uint`
 - Default: `51820`
@@ -123,3 +117,23 @@ This option is used to set the port for the Nginx stub status module. The stub s
 ::: tip Tip
 Make sure the port you set is not being used by other services.
 :::
+
+## Container Control
+
+In this section, we will introduce configuration options in Nginx UI for controlling Nginx services running in another Docker container.
+
+### ContainerName
+- Type: `string`
+- Version: `>= v2.0.0-rc.6`
+
+This option is used to specify the name of the Docker container where Nginx is running.
+
+If this option is empty, Nginx UI will control the Nginx service on the local machine or within the current container.
+
+If this option is not empty, Nginx UI will control the Nginx service running in the specified container.
+
+::: tip Tip
+If you are using the official Nginx UI container and want to control Nginx in another container, you must map the host's docker.sock to the Nginx UI container.
+
+For example: `-v /var/run/docker.sock:/var/run/docker.sock`
+:::

+ 18 - 4
docs/zh_CN/guide/config-nginx.md

@@ -108,10 +108,6 @@ nginx
 start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
 ```
 
-## Stub Status
-
-在本节中,我们将会介绍 Nginx UI 中关于 Nginx stub status 模块的配置选项。
-
 ### StubStatusPort
 - 类型:`uint`
 - 默认值:`51820`
@@ -123,4 +119,22 @@ start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
 请确保您设置的端口未被其他服务占用。
 :::
 
+## 容器控制
+
+在本节中,我们将会介绍 Nginx UI 中关于控制运行在另一个 Docker 容器中的 Nginx 服务的配置选项。
+
+### ContainerName
+- 类型:`string`
+- 版本:`>= v2.0.0-rc.6`
+
+此选项用于指定运行 Nginx 的 Docker 容器名称。
+
+如果此选项为空,Nginx UI 将控制本机或当前容器内的 Nginx 服务。
+
+如果此选项不为空,Nginx UI 将控制运行在指定容器中的 Nginx 服务。
 
+::: tip 提示
+如果使用 Nginx UI 官方容器,想要控制另外一个容器里的 Nginx,务必将宿主机内的 docker.sock 映射到 Nginx UI 官方容器中。
+
+例如:`-v /var/run/docker.sock:/var/run/docker.sock`
+:::

+ 20 - 4
docs/zh_TW/guide/config-nginx.md

@@ -101,10 +101,6 @@ start-stop-daemon --stop --quiet --oknodo --retry=TERM/30/KILL/5 --pidfile $PID
 start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
 ```
 
-## Stub Status
-
-在本節中,我們將會介紹 Nginx UI 中關於 Nginx stub status 模組的設定選項。
-
 ### StubStatusPort
 - 類型:`uint`
 - 預設值:`51820`
@@ -115,3 +111,23 @@ start-stop-daemon --start --quiet --pidfile $PID --exec $SBIN_PATH
 ::: tip 提示
 請確保您設定的連接埠未被其他服務佔用。
 :::
+
+## 容器控制
+
+在本節中,我們將會介紹 Nginx UI 中關於控制運行在另一個 Docker 容器中的 Nginx 服務的設定選項。
+
+### ContainerName
+- 類型:`string`
+- 版本:`>= v2.0.0-rc.6`
+
+此選項用於指定執行 Nginx 的 Docker 容器名稱。
+
+如果此選項為空,Nginx UI 將控制本機或當前容器內的 Nginx 服務。
+
+如果此選項不為空,Nginx UI 將控制執行在指定容器中的 Nginx 服務。
+
+::: tip 提示
+如果使用 Nginx UI 官方容器,想要控制另外一個容器裡的 Nginx,務必將宿主機內的 docker.sock 映射到 Nginx UI 官方容器中。
+
+例如:`-v /var/run/docker.sock:/var/run/docker.sock`
+:::