flnxi-Wu/license-server/.env.example
2026-05-25 14:31:58 +08:00

28 lines
1.3 KiB
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.

# PostgreSQL(Docker Compose 部署时也会直接使用这三个变量)
POSTGRES_USER="license"
POSTGRES_PASSWORD="replace-with-strong-postgres-password"
POSTGRES_DB="license_db"
# 数据库连接
# 主数据库(管理项目和用户)
MAIN_DATABASE_URL="postgresql://license:replace-with-strong-postgres-password@localhost:5432/license_db?schema=main"
# 主库加密密钥(用于加密项目数据库密码,至少 32 字节)
MAIN_DB_ENCRYPTION_KEY="replace-with-32-byte-or-longer-encryption-key"
# 项目数据库(默认项目,兼容旧配置)
DATABASE_URL="postgresql://license:replace-with-strong-postgres-password@localhost:5432/license_db?schema=public"
# RSA 密钥(生产环境必须使用 generate-keys 脚本生成,不要使用默认值)
RSA_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
# AES 加密密钥(32字节 hex)
AES_SECRET_KEY="replace-with-64-char-hex-key"
# JWT 密钥(生产环境必须配置,最少 32 字节)
# 警告:未配置或长度不足将导致管理员认证功能不可用
JWT_SECRET="your-jwt-secret-key-at-least-32-bytes-long"
# 管理员初始密码(只作为初始化入口,不要保留弱默认值)
ADMIN_INITIAL_PASSWORD="replace-with-strong-initial-admin-password"