Files
grok2api/.env.example
T

48 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
# 写入本地文件日志
LOG_FILE_ENABLED=true
# 账号目录增量同步间隔(秒)
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+aiomysql://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