Skip to content

Commit

Permalink
chore(docs): add env reference
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJacky committed May 8, 2024
1 parent c18f8f0 commit 392cac4
Show file tree
Hide file tree
Showing 10 changed files with 238 additions and 4 deletions.
7 changes: 7 additions & 0 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: 'Cluster', link: '/guide/config-cluster'}
]
},
{
text: 'Environment Variables',
collapsed: false,
items: [
{text: 'Reference', link: '/guide/env'},
]
},
{
text: 'Appendix',
collapsed: false,
Expand Down
7 changes: 7 additions & 0 deletions docs/.vitepress/config/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export const zhCNConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: '集群', link: '/zh_CN/guide/config-cluster'}
]
},
{
text: '环境变量',
collapsed: false,
items: [
{text: '参考手册', link: '/zh_CN/guide/env'},
]
},
{
text: '附录',
collapsed: false,
Expand Down
7 changes: 7 additions & 0 deletions docs/.vitepress/config/zh_TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export const zhTWConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
{text: '集群', link: '/zh_TW/guide/config-cluster'}
]
},
{
text: '環境變量',
collapsed: false,
items: [
{text: '參考手冊', link: '/zh_TW/guide/env'},
]
},
{
text: '附錄',
collapsed: false,
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Regular users should follow the [quick start](./getting-started) guide.
## Prerequisites

- Make.
- Golang version 1.21 or higher.
- Golang version 1.22 or higher.
- node.js version 21 or higher.

You should execute the following command to update browser list database before build project.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/config-cluster.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 集群
# Cluster
From v2.0.0-beta.23, you can define multiple environments in the `cluster` section of the configuration file.

## Node
Expand Down
71 changes: 71 additions & 0 deletions docs/guide/env.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docs/zh_CN/guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## 依赖

- Make
- Golang 版本 1.21 或更高
- Golang 版本 1.22 或更高
- node.js 版本 21 或更高

你需要在构建项目之前执行以下命令更新浏览器列表数据库。
Expand Down
71 changes: 71 additions & 0 deletions docs/zh_CN/guide/env.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docs/zh_TW/guide/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## 依賴

- Make
- Golang 版本 1.21 或更高
- Golang 版本 1.22 或更高
- node.js 版本 21 或更高

你需要在構建專案之前執行以下命令更新瀏覽器列表資料庫。
Expand Down
71 changes: 71 additions & 0 deletions docs/zh_TW/guide/env.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 392cac4

Please sign in to comment.