Files
grok2api/.env.example
T
Chenyme b407443820 refactor: update configuration and improve account management features
- Removed unnecessary environment variable patterns from .gitignore.
- Renamed configuration keys in config.defaults.toml for clarity (function_enabled to webui_enabled, function_key to webui_key).
- Increased usage concurrency limit from 10 to 50 in AccountRefreshService.
- Updated docker-compose.yml to remove default Redis URL.
- Enhanced Dockerfile for better build efficiency and added health check.
- Removed deprecated aiofiles dependency and updated other dependencies in pyproject.toml.
- Deleted outdated readme.md file.
- Improved account management logic in various modules, including state machine and refresh service.
- Added support for new quota management features and improved logging for account refresh operations.
2026-04-10 00:19:25 +08:00

47 lines
1.2 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Grok2API environment example
#
# 用法:
# 1. 复制为 .env 后按需修改
# 2. 启动期 / 部署期变量放这里
# 3. 常规运行时配置优先改 data/config.toml
# ==================== 基础运行 ====================
TZ=Asia/Shanghai
LOG_LEVEL=INFO
# 账号目录增量同步间隔(秒)
ACCOUNT_SYNC_INTERVAL=30
# ==================== Web 服务 / Docker Compose ====================
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
SERVER_WORKERS=1
# Docker Compose 宿主机映射端口
HOST_PORT=8000
# ==================== 账号存储(启动期) ====================
# 可选:local | redis | mysql | postgresql
ACCOUNT_STORAGE=local
# local: SQLite 文件路径
ACCOUNT_LOCAL_PATH=data/accounts.db
# redis: Redis DSN(ACCOUNT_STORAGE=redis 时必填)
# ACCOUNT_REDIS_URL=redis://:password@host:6379/0
# mysql: SQLAlchemy DSN
# ACCOUNT_MYSQL_URL=mysql+asyncmy://user:password@127.0.0.1:3306/grok2api
# postgresql: SQLAlchemy DSN
# ACCOUNT_POSTGRESQL_URL=postgresql+asyncpg://user:password@127.0.0.1:5432/grok2api
# ==================== 可选:初始化脚本目录 ====================
# 仅 scripts/init_storage.sh 使用;不影响应用内配置路径解析
DATA_DIR=./data
LOG_DIR=./logs