baoxiang/.env.example
2025-12-16 18:06:50 +08:00

55 lines
1.5 KiB
Plaintext
Raw Permalink 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.

# ========================================
# 数据库配置 (MySQL)
# ========================================
# MySQL连接格式: mysql+pymysql://username:password@host:port/database_name
# 默认连接到本地MySQL服务器
DATABASE_URL=mysql+pymysql://root:password@localhost:3306/treasure_box_game
# 数据库连接池配置
DB_POOL_SIZE=20
DB_MAX_OVERFLOW=30
DB_POOL_TIMEOUT=30
DB_POOL_RECYCLE=3600
# ========================================
# JWT配置
# ========================================
SECRET_KEY=your-secret-key-change-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=10080
# ========================================
# Redis配置
# ========================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=
# ========================================
# 游戏配置
# ========================================
NEW_USER_REWARD=100000
DAILY_ALLOWANCE=5000
ALLOWANCE_THRESHOLD=1000
# ========================================
# 抽水配置
# ========================================
HOUSE_EDGE=0.10
STREAMER_SHARE=0.05
PLATFORM_SHARE=0.05
# ========================================
# MySQL Docker配置说明
# ========================================
# 如果使用docker-compose中的MySQL服务连接地址为:
# DATABASE_URL=mysql+pymysql://root:treasure_box_2024@mysql:3306/treasure_box_game
#
# MySQL容器配置:
# - 用户名: root
# - 密码: treasure_box_2024
# - 数据库: treasure_box_game
# - 端口: 3306