Spaces:
Paused
Paused
File size: 1,566 Bytes
99a7ebb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # ============================================
# 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
|