Skip to content

Commit ff0f33e

Browse files
committed
chore: update env description
1 parent 4bb3a91 commit ff0f33e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.env.example

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ NEXT_PUBLIC_MINIO_SECRET_KEY=xxx
33
NEXT_PUBLIC_MINIO_END_POINT=xxx
44
NEXT_PUBLIC_MINIO_BUCKET=xxx
55

6-
# if you are using self-signed certificate, set this to 0
7-
NODE_TLS_REJECT_UNAUTHORIZED=0
6+
NEXT_PUBLIC_SITE_HOST=https://example.com
87

8+
# http 无法访问 https,也可使用 next dev --experimental-https 生成证书
9+
NODE_TLS_REJECT_UNAUTHORIZED=0
910

1011
AUTH_SECRET=xxx # Added by `npx auth`. Read more: https://cli.authjs.dev
1112

1213
# https://authjs.dev/getting-started/authentication/oauth?framework=next-js
1314
AUTH_GITHUB_ID=xxx
1415
AUTH_GITHUB_SECRET=xxx
1516

17+
# 部署后 Github OAthu 认证出现 Server Error
1618
# https://github.com/nextauthjs/next-auth/issues/3770#issuecomment-2145575926
1719
AUTH_TRUST_HOST=true
1820

19-
# fix: docker 容器部署后,next-auth 并没有正确推断出 redirect_uri
20-
AUTH_URL=https://company.com/app1/auth
21+
# fix: docker 部署后,next-auth 并没有正确推断出 redirect_uri
22+
# redirect_uri 变成了容器 id + 端口,所以这里明确指向
23+
AUTH_URL=https://example.com/api/auth
2124

22-
23-
NEXT_PUBLIC_SITE_HOST=https://example.com

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
"node": ">=18.18"
88
},
99
"scripts": {
10-
"dev": "run-p watch generate dev:turbo ",
10+
"dev": "run-p watch generate dev:turbo",
1111
"dev:turbo": "next dev --turbopack",
12+
"dev:https": "next dev --experimental-https",
1213
"build": "npm run generate && next build",
1314
"start": "next start",
1415
"lint": "next lint",
@@ -92,7 +93,7 @@
9293
},
9394
"lint-staged": {
9495
"**/*.{js,jsx,ts,tsx}": [
95-
"eslint --fix --cache",
96+
"eslint --fix",
9697
"prettier --write"
9798
],
9899
"**/*.{md,mdx}": [

0 commit comments

Comments
 (0)