Files
aitsc/.env.example
renjianbo ba73f8395a chore: add project analysis doc, clean up legacy scripts, update docs
- Add comprehensive project analysis document (项目分析文档.md)
- Add Windows startup guide and batch script
- Replace legacy startup scripts with run_production.py (Waitress)
- Remove deprecated bat scripts and duplicate run files
- Update .env.example, README.md, and docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-03 08:55:43 +08:00

110 lines
3.2 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.
# ========================================
# Flask提示词大师应用环境变量配置示例
# ========================================
# 复制此文件为 .env 并根据实际情况修改配置
# cp env.example .env
# ========================================
# Flask基础配置
# ========================================
# Flask应用密钥必需
SECRET_KEY=your-secret-key-here
# 应用环境development/production/testing
FLASK_ENV=development
# 调试模式(开发环境开启,生产环境关闭)
DEBUG=True
# HTTP 端口(可选;仅 Waitress 生产 run_production.py 读取;开发 run_dev.py 固定 5002
# PORT=5000
# ========================================
# 数据库配置
# ========================================
# 主数据库连接URL必需
# MySQL示例: mysql+pymysql://username:password@host:port/database_name?charset=utf8mb4
DATABASE_URL=mysql+pymysql://username:password@localhost:3306/database_name?charset=utf8mb4
# 腾讯云数据库连接URL可选
# TENCENT_DATABASE_URL=mysql+pymysql://username:password@tencent-host:port/database_name?charset=utf8mb4
# ========================================
# OpenAI兼容API配置
# ========================================
# API基础URL必需
LLM_API_URL=https://api.deepseek.com/v1
# API密钥必需
LLM_API_KEY=sk-your-api-key-here
# ========================================
# 微信小程序配置
# ========================================
# 小程序AppID必需
WX_APPID=your-wx-appid-here
# 小程序Secret必需
WX_SECRET=your-wx-secret-here
# ========================================
# 跨域配置
# ========================================
# 允许跨域的域名,多个用逗号分隔
# 开发环境: http://localhost:3000,http://127.0.0.1:3000
# 生产环境: https://yourdomain.com,https://www.yourdomain.com
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
# ========================================
# 日志配置
# ========================================
# 日志级别DEBUG/INFO/WARNING/ERROR/CRITICAL
LOG_LEVEL=INFO
# 日志文件路径
LOG_FILE=logs/app.log
# ========================================
# 缓存配置
# ========================================
# 缓存类型simple/redis/memcached
CACHE_TYPE=simple
# 缓存默认超时时间(秒)
CACHE_DEFAULT_TIMEOUT=300
# Redis缓存URL当CACHE_TYPE=redis时使用
# REDIS_URL=redis://localhost:6379/0
# ========================================
# 会话配置
# ========================================
# 会话生命周期(小时)
SESSION_LIFETIME_HOURS=24
# ========================================
# 文件上传配置
# ========================================
# 最大文件上传大小(字节)
MAX_CONTENT_LENGTH=16777216
# 文件上传目录
UPLOAD_FOLDER=uploads
# ========================================
# 安全配置
# ========================================
# 是否启用CSRF保护
WTF_CSRF_ENABLED=True
# CSRF令牌超时时间
WTF_CSRF_TIME_LIMIT=3600
# ========================================
# 性能配置
# ========================================
# 数据库连接池大小
DB_POOL_SIZE=20
# 数据库连接池最大溢出连接数
DB_MAX_OVERFLOW=30