diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e53cab94 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# Logs / local runtime +debug-logs/ +*.log + +# IDE / OS +.idea/ +.vscode/ +.DS_Store +Thumbs.db + +# Frontend (Node/React) +node_modules/ +build/ +dist/ +.vite/ + +# Backend (Python/Flask) +__pycache__/ +*.py[cod] +.venv/ +venv/ + +# Env (do not commit secrets) +InfoGenie-backend/.env +.env.local +.env.*.local + diff --git a/InfoGenie-backend/.env b/InfoGenie-backend/.env deleted file mode 100755 index a0e30219..00000000 --- a/InfoGenie-backend/.env +++ /dev/null @@ -1,15 +0,0 @@ -# InfoGenie 环境变量配置文件 -# 请勿将此文件提交到版本控制系统 - -# 邮件配置 -MAIL_USERNAME=shumengya888@foxmail.com -MAIL_PASSWORD=dpdouefloajfdagd - -# 数据库配置 -MONGO_URI=mongodb://shumengya:shumengya520@47.108.90.0:27017/InfoGenie?authSource=admin - -# 应用密钥 -SECRET_KEY=infogenie-secret-key-2025 - -# 环境配置 -FLASK_ENV=development diff --git a/InfoGenie-backend/.env.example b/InfoGenie-backend/.env.example new file mode 100644 index 00000000..2ff2689c --- /dev/null +++ b/InfoGenie-backend/.env.example @@ -0,0 +1,16 @@ +# InfoGenie 环境变量配置示例 +# 复制为 .env 并按需填写;不要把 .env 提交到仓库 + +# 邮件配置 +MAIL_USERNAME=your_email@example.com +MAIL_PASSWORD=your_mail_password_or_app_token + +# 数据库配置 +MONGO_URI=mongodb://user:pass@127.0.0.1:27017/InfoGenie?authSource=admin + +# 应用密钥 +SECRET_KEY=change-me + +# 环境配置 +FLASK_ENV=development + diff --git a/InfoGenie-frontend/.env.production b/InfoGenie-frontend/.env.production index 41a7dfa9..5d24c3f0 100644 --- a/InfoGenie-frontend/.env.production +++ b/InfoGenie-frontend/.env.production @@ -1,13 +1,13 @@ -# React 构建时环境变量 -# 用于 Docker 构建 - -# API URL - 在 Docker 环境下,前端和后端在同一个容器 -# 使用相对路径,这样前端会自动使用当前域名 -REACT_APP_API_URL= - -# 应用信息 -REACT_APP_NAME=InfoGenie -REACT_APP_VERSION=1.0.0 - -# 调试模式(生产环境关闭) -REACT_APP_DEBUG=false +# React 生产环境变量 +# 用于前端独立部署 + +# API URL - 指向后端服务器 +# 使用域名方式访问后端 API +REACT_APP_API_URL=https://infogenie.api.shumengya.top + +# 应用信息 +REACT_APP_NAME=InfoGenie +REACT_APP_VERSION=1.0.0 + +# 调试模式(生产环境关闭) +REACT_APP_DEBUG=false