| # ============================================ |
| # ChatGPT2API 环境变量配置示例 |
| # ============================================ |
| |
| # 认证密钥(必填) |
| CHATGPT2API_AUTH_KEY=your_secret_key_here |
| |
| # 基础 URL(可选,用于生成图片 URL) |
| # CHATGPT2API_BASE_URL=https://your-domain.com |
| |
| # ============================================ |
| # 存储后端配置 |
| # ============================================ |
| |
| # 存储后端类型(可选值: json, sqlite, postgres, git) |
| # 默认: json |
| STORAGE_BACKEND=json |
| |
| # ============================================ |
| # 数据库配置(当 STORAGE_BACKEND=sqlite/postgres 时使用) |
| # ============================================ |
| |
| # PostgreSQL 示例 |
| # DATABASE_URL=postgresql://user:password@localhost:5432/chatgpt2api |
| |
| # Supabase 示例 |
| # DATABASE_URL=postgresql://postgres.xxx:password@aws-1-us-west-1.pooler.supabase.com:5432/postgres |
| |
| # SQLite 示例(不指定时自动使用 data/accounts.db) |
| # DATABASE_URL=sqlite:///app/data/accounts.db |
| |
| # ============================================ |
| # Git 仓库配置(当 STORAGE_BACKEND=git 时使用) |
| # ============================================ |
| |
| # Git 仓库地址(必填) |
| # GIT_REPO_URL=https://github.com/your-username/your-private-repo.git |
| |
| # Git 访问令牌(必填) |
| # GitHub: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| # GitLab: glpat-xxxxxxxxxxxxxxxxxxxx |
| # GIT_TOKEN=your_git_token_here |
| |
| # Git 分支(可选,默认: main) |
| # GIT_BRANCH=main |
| |
| # Git 仓库中的文件路径(可选,默认: accounts.json) |
| # GIT_FILE_PATH=accounts.json |
|
|