duoqi-api/.env.prod.example
Wang Zhuoxuan 3623ad04b6 docs: 添加 JWT_SECRET 和 ADMIN_TOKEN 生成方式说明
在环境变量模板和部署文档中添加了密钥生成的安全实践说明,
包括 openssl 和 Node.js 两种生成方式,以及相关的安全提示。
2026-04-16 16:02:01 +08:00

36 lines
760 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 生产环境变量模板
# 复制为 .env.prod 使用
# Database
DATABASE_URL=mysql://duoqi_prod:prod-password@your-rds-endpoint:3306/duoqi_prod
# JWT
# 生成安全密钥: openssl rand -base64 32
# 密钥长度必须 >= 32 字符
JWT_SECRET=prod-super-secret-jwt-key-change-this
JWT_EXPIRES_IN=1h
JWT_REFRESH_EXPIRES_IN=30d
# Admin
# 生成方式同 JWT_SECRET生产环境必须使用强密钥
ADMIN_TOKEN=prod-admin-token-change-this
# Huawei ID Kit
HUAWEI_CLIENT_ID=
HUAWEI_CLIENT_SECRET=
# Alibaba Cloud OSS
OSS_ACCESS_KEY_ID=
OSS_ACCESS_KEY_SECRET=
OSS_BUCKET=duoqi-assets
OSS_REGION=oss-cn-hangzhou
# Huawei IAP
HUAWEI_IAP_URL=https://subscr-drcn.iap.hicloud.com
HUAWEI_MERCHANT_ID=
# Application
PORT=3000
NODE_ENV=production
LOG_LEVEL=warn