feat: expose BookOrbit through HK edge

This commit is contained in:
Codex
2026-09-27 22:05:43 -07:00
parent 2d45a6dfe2
commit f2921fa9f6
10 changed files with 124 additions and 2 deletions
@@ -0,0 +1,9 @@
# BookOrbit media-core 隧道客户端
该项目通过 FRP 将 media-core 本机的 BookOrbit `127.0.0.1:3000` 主动映射到 HK 边缘容器的内部端口 `13000`。使用 host network 只为访问 BookOrbit 的本机发布端口,不挂载 Docker socket,也不开放管理界面。
- 服务端:`104.245.43.84:7000`
- 本地上游:`127.0.0.1:3000`
- HK 内部映射:`bookorbit-frps:13000`
- 密钥:Arcane Project Environment 中的 `FRP_TOKEN`,必须和 HK 项目一致
- 链路:FRP TLS + wire protocol v2;失败后持续重连
@@ -0,0 +1,27 @@
x-arcane:
icon: book-open
urls:
- https://books.kais.cloud/
services:
frpc:
image: ghcr.io/fatedier/frpc:v0.71.0@sha256:99ece6a2b62cfc68731e0df289af804ff1c699911cfc47871856434f1d6d53ee
container_name: bookorbit-frpc
restart: unless-stopped
network_mode: host
command: ["-c", "/etc/frp/frpc.toml"]
environment:
FRP_TOKEN: ${FRP_TOKEN}
volumes:
- ./frpc.toml:/etc/frp/frpc.toml:ro
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
labels:
com.getarcaneapp.arcane.icon: book-open
logging:
driver: json-file
options:
max-size: 2m
max-file: "3"
@@ -0,0 +1,24 @@
serverAddr = "104.245.43.84"
serverPort = 7000
loginFailExit = false
auth.method = "token"
auth.token = "{{ .Envs.FRP_TOKEN }}"
transport.protocol = "tcp"
transport.tls.enable = true
transport.wireProtocol = "v2"
[[proxies]]
name = "bookorbit"
type = "tcp"
localIP = "127.0.0.1"
localPort = 3000
remotePort = 13000
[proxies.healthCheck]
type = "http"
path = "/api/v1/health"
timeoutSeconds = 5
maxFailed = 3
intervalSeconds = 10
+1
View File
@@ -6,6 +6,7 @@
- App data: `/opt/media-core/appdata/bookorbit/app`
- PostgreSQL: `/opt/media-core/appdata/bookorbit/postgres`
- Secrets: `/opt/media-core/appdata/bookorbit/secrets` (`0600`, not in Git)
- Public URL: `https://books.kais.cloud` through the media-core FRP client and HK Caddy; LAN port `3000` remains available for recovery.
Create the first library with container path `/books`. Do not later widen or replace that root without a database backup and a tested migration: BookOrbit currently has an open issue where root-folder changes can duplicate books or lose metadata and reading progress.
+2 -2
View File
@@ -17,8 +17,8 @@ services:
environment:
NODE_ENV: production
PORT: "3000"
APP_URL: http://192.168.50.46:3000
CLIENT_URL: http://192.168.50.46:3000
APP_URL: https://books.kais.cloud
CLIENT_URL: https://books.kais.cloud
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
POSTGRES_USER: bookorbit