Files
CheckInApp/.env.example
T
8a12744 d811c20932 feat(backend): replace Selenium with Playwright
BREAKING CHANGE: backend now requires Python 3.12 or newer.
2026-05-04 21:20:30 +08:00

56 lines
2.1 KiB
Bash
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.
# 环境变量配置示例
# 复制此文件为 .env 并修改相应的值
# ==================== 基础配置 ====================
# 数据库配置(可选,默认使用 SQLite)
# DATABASE_URL=sqlite:///./data/checkin.db
# DATABASE_URL=postgresql://user:password@localhost/checkin
# 安全配置(鉴权 JWT 密钥,需修改以保证安全)
SECRET_KEY=CheckInSecretKey
# CORS 允许的前端域名(逗号分隔,生产环境必须修改)
CORS_ORIGINS=http://localhost:3000
# 前端 URL 配置(用于邮件中的链接)
FRONTEND_URL=http://localhost:3000
# 日志级别(可选:DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO
# ==================== 邮件配置 ====================
# SMTP 服务器地址(例如:smtp.qq.com, smtp.gmail.com, smtp.163.com
SMTP_SERVER=smtp.example.com
# SMTP 服务器端口(通常 SSL/TLS 使用 465STARTTLS 使用 587
SMTP_PORT=465
# 发件人邮箱地址
SMTP_SENDER_EMAIL=your-email@example.com
# 邮箱密码或授权码
# 重要提示:这里通常不是你的邮箱登录密码,而是邮箱服务商提供的"应用专用密码"或"授权码"
# QQ邮箱:设置 -> 账户 -> POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务 -> 生成授权码
# Gmail:安全 -> 两步验证 -> 应用专用密码
# 163邮箱:设置 -> POP3/SMTP/IMAP -> 授权密码管理
SMTP_SENDER_PASSWORD=your-auth-code-here
# 是否使用 SSL/TLSTrue/False,默认 True
SMTP_USE_SSL=True
# ==================== Playwright 浏览器配置 ====================
# 浏览器可执行文件路径(可选,留空则使用 Playwright 管理的 Chromium
# Windows 示例:BROWSER_EXECUTABLE_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe
# Linux 示例:BROWSER_EXECUTABLE_PATH=/usr/bin/google-chrome
BROWSER_EXECUTABLE_PATH=
# ==================== 定时任务配置 ====================
# 注意:每个任务的打卡时间由任务自身的 cron_expression 字段控制
# 这里只配置全局的后台任务间隔
# Token 有效性检查间隔(分钟)
TOKEN_CHECK_INTERVAL_MINUTES=30
# 会话数据清理间隔(小时)
SESSION_CLEANUP_INTERVAL_HOURS=24