forked from chenyme/grok2api
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (59 loc) · 1.88 KB
/
docker-compose.yml
File metadata and controls
62 lines (59 loc) · 1.88 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
59
60
61
62
services:
grok2api:
container_name: grok2api
build:
context: .
image: grok2api-local:latest
ports:
- "${HOST_PORT:-8100}:${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
- >
sleep 15 &&
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
# Warp 落地代理 - 获取干净的 CF IP
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
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
flaresolverr:
container_name: flaresolverr
image: ghcr.io/flaresolverr/flaresolverr:latest
ports:
- "127.0.0.1:8191:8191"
environment:
TZ: Asia/Shanghai
LOG_LEVEL: info
PROXY_URL: http://host.docker.internal:7897
restart: unless-stopped