30 lines
967 B
YAML
30 lines
967 B
YAML
services:
|
|
app:
|
|
image: ghcr.io/basketikun/chatgpt2api:latest
|
|
container_name: chatgpt2api
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:80"
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./config.json:/app/config.json
|
|
environment:
|
|
# 存储后端配置 (可选值: json, sqlite, postgres, git)
|
|
- STORAGE_BACKEND=json
|
|
|
|
# 数据库配置 (当 STORAGE_BACKEND=sqlite/postgres 时使用)
|
|
# - DATABASE_URL=postgresql://user:password@host:5432/dbname
|
|
# - DATABASE_URL=sqlite:///app/data/accounts.db
|
|
|
|
# Git 仓库配置 (当 STORAGE_BACKEND=git 时使用)
|
|
# - GIT_REPO_URL=https://github.com/user/repo.git
|
|
# - GIT_TOKEN=ghp_xxxxxxxxxxxx
|
|
# - GIT_BRANCH=main
|
|
# - GIT_FILE_PATH=accounts.json
|
|
|
|
# 认证密钥 (可选,覆盖 config.json)
|
|
# - CHATGPT2API_AUTH_KEY=your_secret_key
|
|
|
|
# 基础 URL (可选)
|
|
# - CHATGPT2API_BASE_URL=https://your-domain.com
|