chore(docs): add env reference

This commit is contained in:
Jacky 2024-05-08 17:05:24 +08:00
parent c18f8f0b27
commit 392cac4186
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
10 changed files with 238 additions and 4 deletions

View file

@ -42,6 +42,13 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: 'Cluster', link: '/guide/config-cluster'} {text: 'Cluster', link: '/guide/config-cluster'}
] ]
}, },
{
text: 'Environment Variables',
collapsed: false,
items: [
{text: 'Reference', link: '/guide/env'},
]
},
{ {
text: 'Appendix', text: 'Appendix',
collapsed: false, collapsed: false,

View file

@ -47,6 +47,13 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: '集群', link: '/zh_CN/guide/config-cluster'} {text: '集群', link: '/zh_CN/guide/config-cluster'}
] ]
}, },
{
text: '环境变量',
collapsed: false,
items: [
{text: '参考手册', link: '/zh_CN/guide/env'},
]
},
{ {
text: '附录', text: '附录',
collapsed: false, collapsed: false,

View file

@ -46,6 +46,13 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: '集群', link: '/zh_TW/guide/config-cluster'} {text: '集群', link: '/zh_TW/guide/config-cluster'}
] ]
}, },
{
text: '環境變量',
collapsed: false,
items: [
{text: '參考手冊', link: '/zh_TW/guide/env'},
]
},
{ {
text: '附錄', text: '附錄',
collapsed: false, collapsed: false,

View file

@ -6,7 +6,7 @@ Regular users should follow the [quick start](./getting-started) guide.
## Prerequisites ## Prerequisites
- Make. - Make.
- Golang version 1.21 or higher. - Golang version 1.22 or higher.
- node.js version 21 or higher. - node.js version 21 or higher.
You should execute the following command to update browser list database before build project. You should execute the following command to update browser list database before build project.

View file

@ -1,4 +1,4 @@
# 集群 # Cluster
From v2.0.0-beta.23, you can define multiple environments in the `cluster` section of the configuration file. From v2.0.0-beta.23, you can define multiple environments in the `cluster` section of the configuration file.
## Node ## Node

71
docs/guide/env.md Normal file
View file

@ -0,0 +1,71 @@
# Environment Variables
Applicable for version v2.0.0-beta.23 and above.
## Server
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| HttpPort | NGINX_UI_SERVER_HTTP_PORT |
| RunMode | NGINX_UI_SERVER_RUN_MODE |
| JwtSecret | NGINX_UI_SERVER_JWT_SECRET |
| HTTPChallengePort | NGINX_UI_SERVER_HTTP_CHALLENGE_PORT |
| StartCmd | NGINX_UI_SERVER_START_CMD |
| Database | NGINX_UI_SERVER_DATABASE |
| CADir | NGINX_UI_SERVER_CA_DIR |
| GithubProxy | NGINX_UI_SERVER_GITHUB_PROXY |
| NodeSecret | NGINX_UI_SERVER_NODE_SECRET |
| Demo | NGINX_UI_SERVER_DEMO |
| PageSize | NGINX_UI_SERVER_PAGE_SIZE |
| HttpHost | NGINX_UI_SERVER_HTTP_HOST |
| CertRenewalInterval | NGINX_UI_SERVER_CERT_RENEWAL_INTERVAL |
| RecursiveNameservers | NGINX_UI_SERVER_RECURSIVE_NAMESERVERS |
| SkipInstallation | NGINX_UI_SERVER_SKIP_INSTALLATION |
| Name | NGINX_UI_SERVER_NAME |
## Nginx
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| AccessLogPath | NGINX_UI_NGINX_ACCESS_LOG_PATH |
| ErrorLogPath | NGINX_UI_NGINX_ERROR_LOG_PATH |
| ConfigDir | NGINX_UI_NGINX_CONFIG_DIR |
| PIDPath | NGINX_UI_NGINX_PID_PATH |
| TestConfigCmd | NGINX_UI_NGINX_TEST_CONFIG_CMD |
| ReloadCmd | NGINX_UI_NGINX_RELOAD_CMD |
| RestartCmd | NGINX_UI_NGINX_RESTART_CMD |
## OpenAI
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Model | NGINX_UI_OPENAI_MODEL |
| BaseUrl | NGINX_UI_OPENAI_BASE_URL |
| Proxy | NGINX_UI_OPENAI_PROXY |
| Token | NGINX_UI_OPENAI_TOKEN |
## Casdoor
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Endpoint | NGINX_UI_CASDOOR_ENDPOINT |
| ClientId | NGINX_UI_CASDOOR_CLIENT_ID |
| ClientSecret | NGINX_UI_CASDOOR_CLIENT_SECRET |
| Certificate | NGINX_UI_CASDOOR_CERTIFICATE |
| Organization | NGINX_UI_CASDOOR_ORGANIZATION |
| Application | NGINX_UI_CASDOOR_APPLICATION |
| RedirectUri | NGINX_UI_CASDOOR_REDIRECT_URI |
## Logrotate
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Enabled | NGINX_UI_LOGROTATE_ENABLED |
| CMD | NGINX_UI_LOGROTATE_CMD |
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
## Predefined User
In skip installation mode, you can set the following environment variables to create a predefined user:
- NGINX_UI_PREDEFINED_USER_NAME
- NGINX_UI_PREDEFINED_USER_PASSWORD

View file

@ -5,7 +5,7 @@
## 依赖 ## 依赖
- Make - Make
- Golang 版本 1.21 或更高 - Golang 版本 1.22 或更高
- node.js 版本 21 或更高 - node.js 版本 21 或更高
你需要在构建项目之前执行以下命令更新浏览器列表数据库。 你需要在构建项目之前执行以下命令更新浏览器列表数据库。

71
docs/zh_CN/guide/env.md Normal file
View file

@ -0,0 +1,71 @@
# 环境变量
适用于 v2.0.0-beta.23 及以上版本
## 服务器
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| HttpPort | NGINX_UI_SERVER_HTTP_PORT |
| RunMode | NGINX_UI_SERVER_RUN_MODE |
| JwtSecret | NGINX_UI_SERVER_JWT_SECRET |
| HTTPChallengePort | NGINX_UI_SERVER_HTTP_CHALLENGE_PORT |
| StartCmd | NGINX_UI_SERVER_START_CMD |
| Database | NGINX_UI_SERVER_DATABASE |
| CADir | NGINX_UI_SERVER_CA_DIR |
| GithubProxy | NGINX_UI_SERVER_GITHUB_PROXY |
| NodeSecret | NGINX_UI_SERVER_NODE_SECRET |
| Demo | NGINX_UI_SERVER_DEMO |
| PageSize | NGINX_UI_SERVER_PAGE_SIZE |
| HttpHost | NGINX_UI_SERVER_HTTP_HOST |
| CertRenewalInterval | NGINX_UI_SERVER_CERT_RENEWAL_INTERVAL |
| RecursiveNameservers | NGINX_UI_SERVER_RECURSIVE_NAMESERVERS |
| SkipInstallation | NGINX_UI_SERVER_SKIP_INSTALLATION |
| Name | NGINX_UI_SERVER_NAME |
## Nginx
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| AccessLogPath | NGINX_UI_NGINX_ACCESS_LOG_PATH |
| ErrorLogPath | NGINX_UI_NGINX_ERROR_LOG_PATH |
| ConfigDir | NGINX_UI_NGINX_CONFIG_DIR |
| PIDPath | NGINX_UI_NGINX_PID_PATH |
| TestConfigCmd | NGINX_UI_NGINX_TEST_CONFIG_CMD |
| ReloadCmd | NGINX_UI_NGINX_RELOAD_CMD |
| RestartCmd | NGINX_UI_NGINX_RESTART_CMD |
## OpenAI
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Model | NGINX_UI_OPENAI_MODEL |
| BaseUrl | NGINX_UI_OPENAI_BASE_URL |
| Proxy | NGINX_UI_OPENAI_PROXY |
| Token | NGINX_UI_OPENAI_TOKEN |
## Casdoor
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Endpoint | NGINX_UI_CASDOOR_ENDPOINT |
| ClientId | NGINX_UI_CASDOOR_CLIENT_ID |
| ClientSecret | NGINX_UI_CASDOOR_CLIENT_SECRET |
| Certificate | NGINX_UI_CASDOOR_CERTIFICATE |
| Organization | NGINX_UI_CASDOOR_ORGANIZATION |
| Application | NGINX_UI_CASDOOR_APPLICATION |
| RedirectUri | NGINX_UI_CASDOOR_REDIRECT_URI |
## Logrotate
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Enabled | NGINX_UI_LOGROTATE_ENABLED |
| CMD | NGINX_UI_LOGROTATE_CMD |
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
## 预定义用户
在跳过安装模式下,您可以设置以下环境变量以创建预定义用户:
- NGINX_UI_PREDEFINED_USER_NAME
- NGINX_UI_PREDEFINED_USER_PASSWORD

View file

@ -5,7 +5,7 @@
## 依賴 ## 依賴
- Make - Make
- Golang 版本 1.21 或更高 - Golang 版本 1.22 或更高
- node.js 版本 21 或更高 - node.js 版本 21 或更高
你需要在構建專案之前執行以下命令更新瀏覽器列表資料庫。 你需要在構建專案之前執行以下命令更新瀏覽器列表資料庫。

71
docs/zh_TW/guide/env.md Normal file
View file

@ -0,0 +1,71 @@
# 環境變量
適用於 v2.0.0-beta.23 及以上版本
## 伺服器
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| HttpPort | NGINX_UI_SERVER_HTTP_PORT |
| RunMode | NGINX_UI_SERVER_RUN_MODE |
| JwtSecret | NGINX_UI_SERVER_JWT_SECRET |
| HTTPChallengePort | NGINX_UI_SERVER_HTTP_CHALLENGE_PORT |
| StartCmd | NGINX_UI_SERVER_START_CMD |
| Database | NGINX_UI_SERVER_DATABASE |
| CADir | NGINX_UI_SERVER_CA_DIR |
| GithubProxy | NGINX_UI_SERVER_GITHUB_PROXY |
| NodeSecret | NGINX_UI_SERVER_NODE_SECRET |
| Demo | NGINX_UI_SERVER_DEMO |
| PageSize | NGINX_UI_SERVER_PAGE_SIZE |
| HttpHost | NGINX_UI_SERVER_HTTP_HOST |
| CertRenewalInterval | NGINX_UI_SERVER_CERT_RENEWAL_INTERVAL |
| RecursiveNameservers | NGINX_UI_SERVER_RECURSIVE_NAMESERVERS |
| SkipInstallation | NGINX_UI_SERVER_SKIP_INSTALLATION |
| Name | NGINX_UI_SERVER_NAME |
## Nginx
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| AccessLogPath | NGINX_UI_NGINX_ACCESS_LOG_PATH |
| ErrorLogPath | NGINX_UI_NGINX_ERROR_LOG_PATH |
| ConfigDir | NGINX_UI_NGINX_CONFIG_DIR |
| PIDPath | NGINX_UI_NGINX_PID_PATH |
| TestConfigCmd | NGINX_UI_NGINX_TEST_CONFIG_CMD |
| ReloadCmd | NGINX_UI_NGINX_RELOAD_CMD |
| RestartCmd | NGINX_UI_NGINX_RESTART_CMD |
## OpenAI
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Model | NGINX_UI_OPENAI_MODEL |
| BaseUrl | NGINX_UI_OPENAI_BASE_URL |
| Proxy | NGINX_UI_OPENAI_PROXY |
| Token | NGINX_UI_OPENAI_TOKEN |
## Casdoor
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Endpoint | NGINX_UI_CASDOOR_ENDPOINT |
| ClientId | NGINX_UI_CASDOOR_CLIENT_ID |
| ClientSecret | NGINX_UI_CASDOOR_CLIENT_SECRET |
| Certificate | NGINX_UI_CASDOOR_CERTIFICATE |
| Organization | NGINX_UI_CASDOOR_ORGANIZATION |
| Application | NGINX_UI_CASDOOR_APPLICATION |
| RedirectUri | NGINX_UI_CASDOOR_REDIRECT_URI |
## Logrotate
| Configuration Setting | Environment Variable |
| ----------------------------- | ------------------------------------- |
| Enabled | NGINX_UI_LOGROTATE_ENABLED |
| CMD | NGINX_UI_LOGROTATE_CMD |
| Interval | NGINX_UI_LOGROTATE_INTERVAL |
## 預定義使用者
在跳過安裝模式下,您可以設置以下環境變量以創建預定義使用者:
- NGINX_UI_PREDEFINED_USER_NAME
- NGINX_UI_PREDEFINED_USER_PASSWORD