Files
SharedClassManager/backend/.env.example
2026-04-10 14:18:07 +08:00

111 lines
2.8 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.
# ===========================================
# FastAPI 应用配置
# ===========================================
# 应用名称
APP_NAME=班级操行分管理系统
# 运行环境 - production / development / testing
APP_ENV=production
# 调试模式 - true开启详细错误信息生产环境必须为false
DEBUG=False
# 应用密钥 - 必须32位以上随机字符串
SECRET_KEY=your-super-secret-key-min-32-characters-long
# API版本号
API_VERSION=v1
# ===========================================
# MySQL 数据库配置
# ===========================================
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=class_admin
DB_PASSWORD=your-strong-db-password
DB_NAME=classmanagerdb
DB_POOL_SIZE=10
DB_MAX_OVERFLOW=20
# ===========================================
# Redis 缓存配置
# ===========================================
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=your-redis-password
REDIS_DB=0
REDIS_MAX_CONNECTIONS=50
# ===========================================
# JWT 认证配置
# ===========================================
JWT_SECRET_KEY=your-jwt-secret-key-min-32-chars
JWT_ALGORITHM=HS256
JWT_EXPIRE_MINUTES=30
# ===========================================
# 密码加密配置
# ===========================================
PASSWORD_SALT=your-fixed-salt-string-for-password-hash
# ===========================================
# 调试入口配置
# ===========================================
DEBUG_PATH=/a7k9x2m4q8w1e3r5t6y7u8i9o0p1z2x3
# ===========================================
# 扣分规则配置
# ===========================================
DEDUCTION_HOMEWORK_NOT_SUBMIT=2
DEDUCTION_HOMEWORK_LATE=1
DEDUCTION_ATTENDANCE_ABSENT=5
DEDUCTION_ATTENDANCE_LATE=2
DEDUCTION_ATTENDANCE_LEAVE=1
# ===========================================
# 劳动委员固定分值配置
# ===========================================
LABOR_POINTS_ADD=1
LABOR_POINTS_SUBTRACT=-1
# ===========================================
# 班长加减分限制配置
# ===========================================
MONITOR_MAX_ADD=5
MONITOR_MAX_SUBTRACT=-5
# ===========================================
# 日志配置
# ===========================================
LOG_LEVEL=INFO
LOG_MAX_BYTES=104857600
LOG_BACKUP_COUNT=30
LOG_RETENTION_DAYS=365
# ===========================================
# CORS 跨域配置
# ===========================================
# 允许的跨域域名 - 多个域名用英文逗号分隔
# 示例: https://example.com,https://api.example.com
CORS_ORIGINS=https://your-frontend-domain.com,https://your-api-domain.com
# ===========================================
# 上传文件配置
# ===========================================
MAX_UPLOAD_SIZE=5242880
ALLOWED_EXTENSIONS=json
# ===========================================
# 学生初始配置
# ===========================================
STUDENT_INITIAL_POINTS=60