QykXczj commited on
Commit ·
e7df435
1
Parent(s): c753482
chore: add environment configuration example file
Browse files- Add .env.example with comprehensive configuration documentation
- Include authentication key setup (CHATGPT2API_AUTH_KEY)
- Document storage backend options (json, sqlite, postgres, git)
- Provide database connection examples for PostgreSQL, Supabase, and SQLite
- Include Git repository configuration for git-based storage backend
- Add helpful comments explaining each configuration section and defaults
- Serve as reference template for users setting up the application
- .env.example +48 -0
.env.example
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================
|
| 2 |
+
# ChatGPT2API 环境变量配置示例
|
| 3 |
+
# ============================================
|
| 4 |
+
|
| 5 |
+
# 认证密钥(必填)
|
| 6 |
+
CHATGPT2API_AUTH_KEY=your_secret_key_here
|
| 7 |
+
|
| 8 |
+
# 基础 URL(可选,用于生成图片 URL)
|
| 9 |
+
# CHATGPT2API_BASE_URL=https://your-domain.com
|
| 10 |
+
|
| 11 |
+
# ============================================
|
| 12 |
+
# 存储后端配置
|
| 13 |
+
# ============================================
|
| 14 |
+
|
| 15 |
+
# 存储后端类型(可选值: json, sqlite, postgres, git)
|
| 16 |
+
# 默认: json
|
| 17 |
+
STORAGE_BACKEND=json
|
| 18 |
+
|
| 19 |
+
# ============================================
|
| 20 |
+
# 数据库配置(当 STORAGE_BACKEND=sqlite/postgres 时使用)
|
| 21 |
+
# ============================================
|
| 22 |
+
|
| 23 |
+
# PostgreSQL 示例
|
| 24 |
+
# DATABASE_URL=postgresql://user:password@localhost:5432/chatgpt2api
|
| 25 |
+
|
| 26 |
+
# Supabase 示例
|
| 27 |
+
# DATABASE_URL=postgresql://postgres.xxx:password@aws-1-us-west-1.pooler.supabase.com:5432/postgres
|
| 28 |
+
|
| 29 |
+
# SQLite 示例(不指定时自动使用 data/accounts.db)
|
| 30 |
+
# DATABASE_URL=sqlite:///app/data/accounts.db
|
| 31 |
+
|
| 32 |
+
# ============================================
|
| 33 |
+
# Git 仓库配置(当 STORAGE_BACKEND=git 时使用)
|
| 34 |
+
# ============================================
|
| 35 |
+
|
| 36 |
+
# Git 仓库地址(必填)
|
| 37 |
+
# GIT_REPO_URL=https://github.com/your-username/your-private-repo.git
|
| 38 |
+
|
| 39 |
+
# Git 访问令牌(必填)
|
| 40 |
+
# GitHub: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
| 41 |
+
# GitLab: glpat-xxxxxxxxxxxxxxxxxxxx
|
| 42 |
+
# GIT_TOKEN=your_git_token_here
|
| 43 |
+
|
| 44 |
+
# Git 分支(可选,默认: main)
|
| 45 |
+
# GIT_BRANCH=main
|
| 46 |
+
|
| 47 |
+
# Git 仓库中的文件路径(可选,默认: accounts.json)
|
| 48 |
+
# GIT_FILE_PATH=accounts.json
|