docs: add usage about environment var with space

pull/100/head
moonrailgun 2 years ago
parent 2e56139925
commit ae03420b9e

@ -38,6 +38,18 @@ title: Environment Variable
- If it is started by `docker-compose`, you can directly edit `docker-compose.env`, and use `docker compose up -d` directly after the modification to take effect
### About the use of environment variables with spaces
If your environment variable value contains spaces, in order for the system to recognize that this is a complete string instead of treating spaces as separators. You need to wrap a double quotes around the outside.
For example:
```bash
SMTP_SENDER="\"Tailchat\" example@163.com" # If there are repeated double quotes, they need to be escaped with an escape character
```
-------------
:::caution
Some environment variable modifications may need to clear the cache to take effect

@ -38,6 +38,19 @@ title: 环境变量
- 如果是 `docker-compose` 启动,可以直接编辑 `docker-compose.env`, 改动后直接使用 `docker compose up -d` 即可生效
### 关于带空格的环境变量的使用
如果你的环境变量值包含空格,为了让系统能够识别这是一个完整的字符串而不是把空格视为分隔符。你需要在外部包一层双引号。
如下:
```bash
SMTP_SENDER="\"Tailchat\" example@163.com" # 如果有重复的双引号需要使用转义符对其进行转义
```
-----------
:::caution
部分环境变量修改可能需要清理缓存后才能生效
:::

Loading…
Cancel
Save