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
@@ -2,9 +2,10 @@
|
||||
#
|
||||
# 用法:
|
||||
# mkdir moshiro-backend && cd moshiro-backend
|
||||
# 下载本文件为 compose.yaml;写一个 .env(可选):
|
||||
# MOSHIRO_PUBLIC_URL=https://panel.example.com # 面板对外的地址;passkey 绑定在这个域名上,改了会让已注册的 passkey 失效
|
||||
# MOSHIRO_CLAIM_CODE= # 认领码,不写就随机生成并打印在日志里(podman logs moshiro-backend)
|
||||
# 下载本文件为 compose.yaml;再写一个 .env,键是容器里直接用的名字:
|
||||
# MoShiro__PublicUrl=https://panel.example.com # 面板对外的地址;passkey 绑定在这个域名上,改了会让已注册的 passkey 失效
|
||||
# MoShiro__ClaimCode= # 认领码(可选),不写就随机生成并打印在日志里(podman logs moshiro-backend)
|
||||
# (没有 .env 也要先建一个空文件:touch .env)
|
||||
# podman compose up -d # Docker 用 docker compose
|
||||
# 第一次打开面板按页面引导认领:没有默认管理员。面板监听 127.0.0.1:8080,对外请放在反向代理(HTTPS)后面。
|
||||
# 更新:先备份数据卷,再 podman compose pull && podman compose up -d。新版会自动迁移数据库,
|
||||
@@ -12,19 +13,18 @@
|
||||
# 说明见 docs/ops/deployment.md。
|
||||
services:
|
||||
backend:
|
||||
image: registry.oeo.one/${MOSHIRO_IMAGE_NAMESPACE:-moshiro}/moshiro-backend:${MOSHIRO_VERSION:-latest}
|
||||
image: ${MOSHIRO_IMAGE:-registry.oeo.one/moshiro/moshiro-backend}:${MOSHIRO_VERSION:-latest}
|
||||
container_name: moshiro-backend
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
# .env 里的变量原样传进容器(MoShiro__PublicUrl、MoShiro__ClaimCode 等)(不用带默认值的变量替换:有的 compose 提供者,比如 podman-compose,不替换环境变量里的默认值)
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
ASPNETCORE_HTTP_PORTS: "8080"
|
||||
MoShiro__DataDirectory: /data
|
||||
MoShiro__UpdateChannel: ${MOSHIRO_UPDATE_CHANNEL:-auto}
|
||||
MoShiro__ImageNamespace: ${MOSHIRO_IMAGE_NAMESPACE:-moshiro}
|
||||
MoShiro__PublicUrl: "${MOSHIRO_PUBLIC_URL:-}"
|
||||
MoShiro__ClaimCode: "${MOSHIRO_CLAIM_CODE:-}"
|
||||
volumes:
|
||||
- moshiro-backend-data:/data
|
||||
- moshiro-backend-status:/data/update-status:ro
|
||||
|
||||
Reference in new issue
Block a user