Files
WeChatBot/deploy/gateway.compose.yaml
2026-12-04 09:44:59 +08:00

37 lines
1.2 KiB
YAML

# 仅 gateway — 服务器上不需要源码,只拉镜像
# 1Panel:容器 → 编排,粘贴本文件;配合 .env
#
# 首次:docker network create wechatbot (与 record-bot 共用,可选)
services:
gateway:
image: ${GATEWAY_IMAGE:-ghcr.io/kadxy/weixin-ilink-gateway:latest}
container_name: weixin-ilink-gateway
restart: unless-stopped
ports:
- "${GATEWAY_PORT:-29527}:3000"
environment:
API_KEY: ${GATEWAY_API_KEY:?set GATEWAY_API_KEY}
PORT: "3000"
DATA_DIR: /app/data
# 分开部署时填 record-bot 对外可达地址,例如 http://127.0.0.1:5080/webhook/weixin
# 或同 Docker 网络:http://record-bot:8080/webhook/weixin
WEBHOOK_URLS: ${WEBHOOK_URLS:?set WEBHOOK_URLS}
WEBHOOK_TOKEN: ${GATEWAY_WEBHOOK_TOKEN:-}
MAX_DOWNLOAD_SIZE_MB: ${MAX_DOWNLOAD_SIZE_MB:-128}
volumes:
- ${GATEWAY_DATA_DIR:-./data/gateway}:/app/data
networks:
- wechatbot
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/status"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
networks:
wechatbot:
external: true
name: ${DOCKER_NETWORK:-wechatbot}