flnxi-Wu/license-server/.env.example
2026-06-03 18:41:52 +08:00

45 lines
2.4 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"
# 数据库连接
# Docker Compose 部署时,服务容器内应使用 postgres 作为数据库主机名。
# 裸机本地调试时,可把 postgres 改为 localhost。
# 主数据库(管理项目和用户)
MAIN_DATABASE_URL="postgresql://license:replace-with-strong-postgres-password@postgres: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@postgres: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"
# 许可证请求签名密钥(生产环境必须配置,最少 32 字节;素材系统需使用同一值)
LICENSE_REQUEST_SIGNING_SECRET="replace-with-32-byte-or-longer-request-signing-secret"
# 付费模块短期拉包 token 签名密钥(生产环境建议独立配置,最少 32 字节)
MODULE_PULL_TOKEN_SECRET="replace-with-32-byte-or-longer-module-pull-token-secret"
# 付费增强包分发
# paid-core 核心本体放在镜像站,验证服务器只下发授权清单、实例绑定凭证和短期拉包 token。
# 免费版不拉 paid-core;免费版人数/素材数上限由基础镜像按本地签名许可证执行。
PREMIUM_MODULE_REGISTRY_BASE="registry.example.com/flnxi/premium"
PREMIUM_MODULE_VERSION="1.0.0"
# 如需单独覆盖 paid-core 镜像,可使用:
# PREMIUM_MODULE_PAID_CORE_IMAGE="registry.example.com/flnxi/premium/paid-core:1.0.0"
# PREMIUM_MODULE_PAID_CORE_DIGEST="sha256:..."
# 管理员初始密码(只作为初始化入口,不要保留弱默认值)
ADMIN_INITIAL_PASSWORD="replace-with-strong-initial-admin-password"