1
0
Fork 0

发布应用 长毛象 Mastodon

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
Meng Sen 2025-03-14 16:28:41 +08:00
parent 7d7c020070
commit f75d4283fa
4 changed files with 37 additions and 0 deletions

View File

@ -51,6 +51,27 @@ additionalProperties:
required: true
rule: paramPort
type: number
- default: ""
edit: true
envKey: ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY
labelZh: 数据库加密密钥
labelEn: Database encryption key
required: true
type: text
- default: ""
edit: true
envKey: ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT
labelZh: 数据库加密盐
labelEn: Database encryption salt
required: true
type: text
- default: ""
edit: true
envKey: ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY
labelZh: 数据库加密主键
labelEn: Database encryption primary key
required: true
type: text
- default: "127.0.0.1"
edit: true
envKey: DB_HOST

View File

@ -9,6 +9,7 @@ if [ -f .env ]; then
sed -i '/^GLOBAL_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "APP_ENV_FILE=${CURRENT_DIR}/envs/mastodon.env" >> .env
echo "Check Finish."

View File

@ -9,6 +9,7 @@ if [ -f .env ]; then
sed -i '/^GLOBAL_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "APP_ENV_FILE=${CURRENT_DIR}/envs/mastodon.env" >> .env
echo "Check Finish."

View File

@ -43,6 +43,20 @@ API。这带来了一个拥有众多选择的丰富应用生态系统
>
> PostgreSQL 12+
### 密钥
您必须提供唯一的加密密钥:`ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY` `ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY` `ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT`
您可以通过命令:`bin/rails db:encryption:init` 生成。
您也可以使用终端的 `openssl` 命令生成:
```bash
echo "ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 32)"
echo "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=$(openssl rand -hex 32)"
echo "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=$(openssl rand -hex 32)"
```
---
![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png)