mirror of
https://github.com/chenyme/grok2api.git
synced 2026-12-05 16:02:12 +00:00
35 lines
895 B
YAML
35 lines
895 B
YAML
name: grok2api
|
|
|
|
services:
|
|
grok2api:
|
|
container_name: grok2api
|
|
image: "${GROK2API_IMAGE:-ghcr.io/chenyme/grok2api:latest}"
|
|
ports:
|
|
- "${GROK2API_PORT:-8000}:8000"
|
|
environment:
|
|
TZ: "${TZ:-Asia/Shanghai}"
|
|
volumes:
|
|
- "${GROK2API_CONFIG:-./config.yaml}:/run/grok2api/config.yaml:ro"
|
|
- grok2api-data:/app/data
|
|
restart: unless-stopped
|
|
init: true
|
|
stop_grace_period: 30s
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
# 如果出口 IP 不干净,可取消以下注释使用 WARP 作为落地代理。
|
|
# 启用后,在管理端“设置 -> 出口代理”中新增 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
|
|
|
|
volumes:
|
|
grok2api-data:
|