Files
mengyamonitor/mengyamonitor-backend-server/docker-compose.yml
2026-05-16 19:03:34 +08:00

24 lines
895 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 中心服务在容器内仅为 HTTP9393 Web/WS、9394 gRPCTLS 由公网 Nginx 做,与内网无关。
#
# 本文件:在 Docker 内完整执行 go build适合无本机 Go 或 CI
# 若已在 Windows 编好 Linux 二进制,避免镜像内再编译:先运行 build-linux-amd64.bat
# docker compose -f docker-compose.binary.yml up -d --build
services:
central:
build: .
image: mengyamonitor-central:latest
restart: unless-stopped
ports:
# 宿主:容器 —— 可按需改为 "127.0.0.1:9393:9393" 仅本机反代
- "9393:9393"
- "9394:9394"
environment:
HOST: "0.0.0.0"
PORT: "9393"
GRPC_PORT: "9394"
# 务必在宿主设置强口令export ADMIN_TOKEN=... 或下方 env_file
ADMIN_TOKEN: ${ADMIN_TOKEN:-shumengya520}
DB_PATH: /app/data/servers.db
volumes:
- ./data:/app/data