feat: install nodes and the backend from a static compose file; remove dead code [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful
ci/woodpecker/push/main-amd64-build Pipeline was successful
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.
This commit is contained in:
1 parent
e014a19554
commit
12be44645f
31 files changed
+492
-176
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# MoShiro Backend(面板)。Docker 和 rootless/rootful Podman 共用。
|
||||
#
|
||||
# 用法:
|
||||
# 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)
|
||||
# podman compose up -d # Docker 用 docker compose
|
||||
# 第一次打开面板按页面引导认领:没有默认管理员。面板监听 127.0.0.1:8080,对外请放在反向代理(HTTPS)后面。
|
||||
# 更新:先备份数据卷,再 podman compose pull && podman compose up -d。新版会自动迁移数据库,
|
||||
# 但旧版不认比自己新的数据库:想回滚要先恢复备份,只改 MOSHIRO_VERSION 不够。
|
||||
# 说明见 docs/ops/deployment.md。
|
||||
services:
|
||||
backend:
|
||||
image: registry.oeo.one/${MOSHIRO_IMAGE_NAMESPACE:-moshiro}/moshiro-backend:${MOSHIRO_VERSION:-latest}
|
||||
container_name: moshiro-backend
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
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
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:rw,noexec,nosuid,size=64m,mode=1777
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
stop_grace_period: 30s
|
||||
|
||||
volumes:
|
||||
moshiro-backend-data:
|
||||
name: moshiro-backend-data
|
||||
moshiro-backend-status:
|
||||
name: moshiro-backend-status
|
||||
Reference in new issue
Block a user