Files
PolyHermes/docker-compose.prod.env.example
T

61 lines
2.5 KiB
Bash
Raw Normal View History

2025-12-07 17:08:56 +08:00
# PolyHermes 生产环境配置文件示例
# PolyHermes Production Environment Configuration File Example
2025-12-07 17:08:56 +08:00
#
# 使用方法 / Usage:
2025-12-07 17:08:56 +08:00
# 1. 复制此文件为 .env: cp docker-compose.prod.env.example .env
# Copy this file to .env: cp docker-compose.prod.env.example .env
2025-12-07 17:08:56 +08:00
# 2. 修改以下配置项(特别是安全相关的密钥)
# 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
# Run: docker-compose -f docker-compose.prod.yml up -d
2025-12-07 17:08:56 +08:00
# ============================================
# 数据库配置 / Database Configuration
2025-12-07 17:08:56 +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
# 数据库用户名 / Database username
2025-12-07 17:08:56 +08:00
DB_USERNAME=root
# 数据库密码 / Database password
2025-12-07 17:08:56 +08:00
DB_PASSWORD=your_database_password_here
# ============================================
# Spring Profile
# ============================================
# Spring 环境配置(dev/prod/ Spring environment configuration (dev/prod)
2025-12-07 17:08:56 +08:00
SPRING_PROFILES_ACTIVE=prod
# ============================================
# 服务器端口 / Server Port
2025-12-07 17:08:56 +08:00
# ============================================
# 对外暴露的端口(默认 80/ External port (default 80)
2025-12-07 17:08:56 +08:00
SERVER_PORT=80
# ============================================
# MySQL 端口 / MySQL Port
2025-12-07 17:08:56 +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
# ============================================
# 安全配置 / Security Configuration
2025-12-07 17:08:56 +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
JWT_SECRET=change-me-in-production
#
# 管理员密码重置密钥
# Admin password reset key
# 生成方式 / Generate: openssl rand -hex 32
ADMIN_RESET_PASSWORD_KEY=change-me-in-production
#
# 加密密钥,用于加密存储私钥和 API Key
# Encryption key, used for encrypting stored private keys and API keys
# 生成方式 / Generate: openssl rand -hex 32
CRYPTO_SECRET_KEY=change-me-in-production
2025-12-07 17:08:56 +08:00