fix: compose passes .env through env_file; clearer name and channel messages [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful
ci/woodpecker/push/main-amd64-build Pipeline was successful
podman-compose does not substitute defaults inside "environment:" (a value
like ${MOSHIRO_NAME:-} reached the node as the literal text), so the node was
enrolled with an invalid name and reported the wrong network scope. The three
compose files now read .env with env_file and only interpolate image and
network_mode; the Backend .env keys are the container's own names
(MoShiro__PublicUrl, MoShiro__ClaimCode).
- The generated .env no longer carries a comment line for MOSHIRO_NAME; the
dialog says how to choose a name instead.
- The container entrypoint prints the name it enrolls with and defaults
MOSHIRO_NETWORK_SCOPE to host (Docker Desktop sets container in .env).
- The overview and line pages say "measurement channel not established"
instead of "not connected": the agent can be reachable and pingable while
the measurement TCP/UDP path is not.
This commit is contained in:
1 parent
12be44645f
commit
bac1c27e72
10 files changed
+27
-31
No files matched your search
@@ -7,6 +7,7 @@
|
||||
# 更新: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。
|
||||
# .env 里的 MOSHIRO_SERVER、MOSHIRO_JOIN(只在第一次启动用来注册,之后可以删掉)、MOSHIRO_GENESIS、MOSHIRO_CONTROLLERS、MOSHIRO_NAME 原样传进容器。
|
||||
# 说明见 docs/ops/deployment.md。
|
||||
services:
|
||||
probe:
|
||||
@@ -15,15 +16,9 @@ services:
|
||||
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}
|
||||
# .env 里的变量原样传进容器(不用带默认值的变量替换:有的 compose 提供者,比如 podman-compose,不替换环境变量里的默认值)
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- probe-config:/etc/moshiro
|
||||
- probe-status:/etc/moshiro/update-status:ro
|
||||
|
||||
Reference in new issue
Block a user