Files
MoShiro/packaging/compose/probe/compose.yaml
T
justme 12be44645f
ci/woodpecker/push/main-amd64-build Pipeline was successful
feat: install nodes and the backend from a static compose file; remove dead code [CI]
Agent, Probe and Backend now start from one static compose.yaml plus a local
.env: the panel (or the release assets, for the very first Backend) provides
the file, the panel's command writes the public values into .env, checks the
file's SHA-256 and runs compose up. Updating is compose pull && compose up -d.
The image is chosen by the CI channel (:latest, or MOSHIRO_VERSION in .env),
not by the panel; the previous one-line script stays as a fallback.

- packaging/compose/{agent,probe,backend}/compose.yaml are the single source,
  embedded in the Backend and served at /install/compose/{file}; the root
  compose.yaml moved there. Releases also carry them and list them in the
  signed SHA256SUMS.
- The container entrypoint defaults the node name to the host name.
- Join token creation returns a compose block (.env, url, hash, per-platform
  commands); the admin dialog leads with it.
- Remove code with no references (HotLayer members, LiveHub.SubscriberCount,
  QueryService.ParseParams, ReleaseService.Forget, a few constants) and reduce
  the install-code lookup to the role it is for.
2026-10-08 20:24:23 +08:00

47 lines
1.9 KiB
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.
# MoShiro Probe。Docker 和 rootless/rootful Podman 共用。
#
# 用法(面板「添加 Probe」会给出带好参数的 .env 内容):
# mkdir moshiro-probe && cd moshiro-probe
# 把面板给的 .env 内容存成 .env,再下载本文件为 compose.yaml
# podman compose up -d # Docker 用 docker compose
# 更新:podman compose pull && podman compose up -d (身份和配置在命名卷里,不会动)
# 固定版本:在 .env 里写 MOSHIRO_VERSION=0.3.3;想要更严,写成 MOSHIRO_VERSION=0.3.3@sha256:<digest>。
# macOS、Windows 的 Docker Desktop 没有宿主网络:面板给的 .env 里已经写了 MOSHIRO_NETWORK_MODE=bridge。
# 说明见 docs/ops/deployment.md。
services:
probe:
image: ${MOSHIRO_IMAGE:-registry.oeo.one/moshiro/moshiro-probe}:${MOSHIRO_VERSION:-latest}
container_name: moshiro-probe
restart: unless-stopped
init: true
network_mode: ${MOSHIRO_NETWORK_MODE:-host}
environment:
# 只在第一次启动时用来注册(身份写进 probe-config 卷之后,.env 里的 MOSHIRO_JOIN 就可以删掉)
MOSHIRO_SERVER: ${MOSHIRO_SERVER:-}
MOSHIRO_JOIN: ${MOSHIRO_JOIN:-}
MOSHIRO_NAME: ${MOSHIRO_NAME:-}
MOSHIRO_GENESIS: ${MOSHIRO_GENESIS:-}
MOSHIRO_CONTROLLERS: ${MOSHIRO_CONTROLLERS:-}
MOSHIRO_ALLOW_NO_OWNER: ${MOSHIRO_ALLOW_NO_OWNER:-}
MOSHIRO_NETWORK_SCOPE: ${MOSHIRO_NETWORK_SCOPE:-host}
volumes:
- probe-config:/etc/moshiro
- probe-status:/etc/moshiro/update-status:ro
- /etc/os-release:/etc/os-release:ro
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m,mode=1777
security_opt:
- label=disable
- no-new-privileges:true
cap_drop:
- ALL
# Linux ICMP 使用 ping sockets;ping_group_range 需允许容器映射后的 GID。
stop_grace_period: 20s
volumes:
probe-config:
name: moshiro-probe-config
probe-status:
name: moshiro-probe-status