2025-12-07 17:08:56 +08:00
|
|
|
|
# PolyHermes 生产环境配置文件示例
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# PolyHermes Production Environment Configuration File Example
|
2025-12-07 17:08:56 +08:00
|
|
|
|
#
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 使用方法 / Usage:
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# 1. 复制此文件为 .env: cp docker-compose.prod.env.example .env
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# Copy this file to .env: cp docker-compose.prod.env.example .env
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# 2. 修改以下配置项(特别是安全相关的密钥)
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# Modify the following configuration items (especially security-related keys)
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# 3. 运行: docker-compose -f docker-compose.prod.yml up -d
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# Run: docker-compose -f docker-compose.prod.yml up -d
|
2025-12-07 17:08:56 +08:00
|
|
|
|
|
|
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 数据库配置 / Database Configuration
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 数据库连接 URL / Database connection URL
|
2025-12-07 17:08:56 +08:00
|
|
|
|
DB_URL=jdbc:mysql://mysql:3306/polyhermes?useSSL=false&serverTimezone=UTC&characterEncoding=utf8&allowPublicKeyRetrieval=true
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 数据库用户名 / Database username
|
2025-12-07 17:08:56 +08:00
|
|
|
|
DB_USERNAME=root
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 数据库密码 / Database password
|
2025-12-07 17:08:56 +08:00
|
|
|
|
DB_PASSWORD=your_database_password_here
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================
|
|
|
|
|
|
# Spring Profile
|
|
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# Spring 环境配置(dev/prod)/ Spring environment configuration (dev/prod)
|
2025-12-07 17:08:56 +08:00
|
|
|
|
SPRING_PROFILES_ACTIVE=prod
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 服务器端口 / Server Port
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 对外暴露的端口(默认 80)/ External port (default 80)
|
2025-12-07 17:08:56 +08:00
|
|
|
|
SERVER_PORT=80
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# MySQL 端口 / MySQL Port
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 可选,用于外部连接,默认 3307 避免与本地 MySQL 冲突
|
|
|
|
|
|
# Optional, for external connections, default 3307 to avoid conflicts with local MySQL
|
2025-12-07 17:08:56 +08:00
|
|
|
|
MYSQL_PORT=3307
|
|
|
|
|
|
|
|
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# 安全配置 / Security Configuration
|
2025-12-07 17:08:56 +08:00
|
|
|
|
# ============================================
|
2025-12-07 19:11:43 +08:00
|
|
|
|
# ⚠️ 必须修改,不能使用默认值 / ⚠️ Must be modified, cannot use default values
|
|
|
|
|
|
#
|
|
|
|
|
|
# JWT 密钥,用于生成和验证 JWT Token
|
|
|
|
|
|
# JWT secret key, used for generating and validating JWT tokens
|
|
|
|
|
|
# 生成方式 / Generate: openssl rand -hex 64
|
2025-12-07 19:08:29 +08:00
|
|
|
|
JWT_SECRET=change-me-in-production
|
2025-12-07 19:11:43 +08:00
|
|
|
|
#
|
|
|
|
|
|
# 管理员密码重置密钥
|
|
|
|
|
|
# Admin password reset key
|
|
|
|
|
|
# 生成方式 / Generate: openssl rand -hex 32
|
2025-12-07 19:08:29 +08:00
|
|
|
|
ADMIN_RESET_PASSWORD_KEY=change-me-in-production
|
2025-12-07 19:11:43 +08:00
|
|
|
|
#
|
|
|
|
|
|
# 加密密钥,用于加密存储私钥和 API Key
|
|
|
|
|
|
# Encryption key, used for encrypting stored private keys and API keys
|
|
|
|
|
|
# 生成方式 / Generate: openssl rand -hex 32
|
2025-12-07 19:08:29 +08:00
|
|
|
|
CRYPTO_SECRET_KEY=change-me-in-production
|
2025-12-07 17:08:56 +08:00
|
|
|
|
|