forked from chenyme/grok2api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.93 KB
/
docker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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}
SERVER_STORAGE_TYPE: ${SERVER_STORAGE_TYPE:-local}
SERVER_STORAGE_URL: ${SERVER_STORAGE_URL:-}
# 启用 CF 自动刷新: 取消以下三行注释,并取消底部 flaresolverr 服务的注释
# FLARESOLVERR_URL: http://flaresolverr:8191
# CF_REFRESH_INTERVAL: "600"
# CF_TIMEOUT: "60"
# SERVER_STORAGE_TYPE: (local, redis, mysql, pgsql) default: local
# SERVER_STORAGE_URL: (local mode is empty) default: empty
# Redis: redis://localhost:6379/0 or redis://:password@localhost:6379/0
# MySQL: mysql+aiomysql://user:pass@localhost/db
# PgSQL: postgresql+asyncpg://user:pass@localhost/db
command:
- sh
- -c
- >
granian --interface asgi --host "$${SERVER_HOST:-0.0.0.0}"
--port "$${SERVER_PORT:-8000}" --workers "$${SERVER_WORKERS:-1}" main:app
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