mirror of
https://github.com/chenyme/grok2api.git
synced 2026-12-05 16:02:12 +00:00
- 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.
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
services:
|
|
grok2api:
|
|
container_name: grok2api
|
|
image: ghcr.io/chenyme/grok2api:latest
|
|
ports:
|
|
- "${HOST_PORT:-8000}:${SERVER_PORT:-8000}"
|
|
environment:
|
|
TZ: Asia/Shanghai
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
SERVER_HOST: ${SERVER_HOST:-0.0.0.0}
|
|
SERVER_PORT: ${SERVER_PORT:-8000}
|
|
SERVER_WORKERS: ${SERVER_WORKERS:-1}
|
|
ACCOUNT_STORAGE: ${ACCOUNT_STORAGE:-local}
|
|
ACCOUNT_LOCAL_PATH: ${ACCOUNT_LOCAL_PATH:-data/accounts.db}
|
|
ACCOUNT_REDIS_URL: ${ACCOUNT_REDIS_URL:-}
|
|
ACCOUNT_MYSQL_URL: ${ACCOUNT_MYSQL_URL:-}
|
|
ACCOUNT_POSTGRESQL_URL: ${ACCOUNT_POSTGRESQL_URL:-}
|
|
# 启用 CF 自动刷新: 取消以下三行注释,并取消底部 flaresolverr 服务的注释
|
|
# FLARESOLVERR_URL: http://flaresolverr:8191
|
|
# CF_REFRESH_INTERVAL: "600"
|
|
# CF_TIMEOUT: "60"
|
|
|
|
# ACCOUNT_STORAGE: local | redis | mysql | postgresql
|
|
# ACCOUNT_LOCAL_PATH: SQLite path when ACCOUNT_STORAGE=local
|
|
# ACCOUNT_REDIS_URL: Redis DSN when ACCOUNT_STORAGE=redis
|
|
# ACCOUNT_MYSQL_URL: MySQL DSN when ACCOUNT_STORAGE=mysql
|
|
# ACCOUNT_POSTGRESQL_URL: PostgreSQL DSN when ACCOUNT_STORAGE=postgresql
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./logs:/app/logs
|
|
restart: unless-stopped
|
|
|
|
# 如果出口 IP 不干净,可取消以下注释使用 Warp 作为落地代理
|
|
# 启用后将 proxy.base_proxy_url 设为 socks5://warp:1080
|
|
# warp:
|
|
# container_name: warp
|
|
# image: caomingjun/warp:latest
|
|
# restart: unless-stopped
|
|
# ports:
|
|
# - "127.0.0.1:1080:1080"
|
|
# environment:
|
|
# - WARP_SLEEP=2
|
|
# cap_add:
|
|
# - NET_ADMIN
|
|
|
|
# 启用 CF 自动刷新时取消以下注释
|
|
# flaresolverr:
|
|
# container_name: flaresolverr
|
|
# image: ghcr.io/flaresolverr/flaresolverr:latest
|
|
# ports:
|
|
# - "127.0.0.1:8191:8191"
|
|
# environment:
|
|
# TZ: Asia/Shanghai
|
|
# LOG_LEVEL: info
|
|
# restart: unless-stopped
|