fix: require unique Lite JWT secret
This commit is contained in:
1 parent
16f39fc7c6
commit
ab66d9a6fc
2 files changed
+6
-4
No files matched your search
@@ -39,9 +39,13 @@ Forumlify 提供了两个不同架构的分支版本,以满足不同部署环
|
|||||||
```
|
```
|
||||||
git clone https://github.com/furrium/forumlify.git
|
git clone https://github.com/furrium/forumlify.git
|
||||||
cd forumlify
|
cd forumlify
|
||||||
docker-compose up -d
|
printf 'JWT_SECRET=%s\n' "$(openssl rand -hex 32)" > .env
|
||||||
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
旧版 Compose 也可以使用 `docker-compose up -d`。请妥善备份 `.env`;更换
|
||||||
|
`JWT_SECRET` 会使现有登录令牌失效。
|
||||||
|
|
||||||
应用默认运行在 `http://localhost:3000`。
|
应用默认运行在 `http://localhost:3000`。
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -139,4 +143,3 @@ forumlify/
|
|||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
|
|
||||||
+1
-2
@@ -24,8 +24,7 @@ services:
|
|||||||
DATABASE_URL: postgresql://forumlify:123456@db:5432/forumlify
|
DATABASE_URL: postgresql://forumlify:123456@db:5432/forumlify
|
||||||
PORT: 3000
|
PORT: 3000
|
||||||
ENABLE_CAPTCHA: "true"
|
ENABLE_CAPTCHA: "true"
|
||||||
|
JWT_SECRET: "${JWT_SECRET:?Set JWT_SECRET in .env before starting Forumlify}"
|
||||||
JWT_SECRET: "7sALTz9fZZvoIT2iLc1Uox4mo3bgvofzivIFq6HSPiU="
|
|
||||||
# 信任反向代理(Nginx / Docker 端口转发),修复限流警告
|
# 信任反向代理(Nginx / Docker 端口转发),修复限流警告
|
||||||
TRUST_PROXY: "true"
|
TRUST_PROXY: "true"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in new issue
Block a user