2026-05-21-10-38-49 新增Docker部署与FRPC映射
This commit is contained in:
70
Docker部署/威联通NAS/docker_compose.yaml
Normal file
70
Docker部署/威联通NAS/docker_compose.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
# ReVoxelSeg DICOM / QNAP QTS Container Station 直接部署版。
|
||||
# 建议把完整项目放到:/share/Container/revoxelseg_dicom
|
||||
# Container Station 不一定从项目根目录执行 Compose,因此 build.context 与 volumes 使用绝对路径。
|
||||
# 局域网访问:http://NAS_IP:4000/ 或 http://192.168.3.11:4000/
|
||||
# 公网访问:NPM 反向代理将 revoxel.huijutec.cn 转发到 FRP 服务端 10008 后生效。
|
||||
|
||||
name: revoxelseg-dicom-qnap
|
||||
|
||||
services:
|
||||
revoxelseg_web:
|
||||
image: revoxelseg-dicom:web-qnap-20260521
|
||||
build:
|
||||
context: /share/Container/revoxelseg_dicom
|
||||
dockerfile: Docker部署/Dockerfile
|
||||
args:
|
||||
HTTP_PROXY: http://192.168.31.7:7893
|
||||
HTTPS_PROXY: http://192.168.31.7:7893
|
||||
NO_PROXY: localhost,127.0.0.1,192.168.31.0/24,192.168.3.0/24,revoxelseg_web,revoxelseg_frpc
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "4000:4000"
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 4000
|
||||
APP_URL: https://revoxel.huijutec.cn
|
||||
TRUST_PROXY: "true"
|
||||
HTTP_PROXY: http://192.168.31.7:7893
|
||||
HTTPS_PROXY: http://192.168.31.7:7893
|
||||
http_proxy: http://192.168.31.7:7893
|
||||
https_proxy: http://192.168.31.7:7893
|
||||
NO_PROXY: localhost,127.0.0.1,192.168.31.0/24,192.168.3.0/24,revoxelseg_web,revoxelseg_frpc
|
||||
volumes:
|
||||
- /share/Container/revoxelseg_dicom/data:/app/WebSite/data
|
||||
- /share/Container/revoxelseg_dicom/exports:/app/WebSite/exports
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:4000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 20s
|
||||
|
||||
revoxelseg_frpc:
|
||||
image: snowdreamtech/frpc:latest
|
||||
restart: unless-stopped
|
||||
entrypoint: ["/bin/sh"]
|
||||
command:
|
||||
- -c
|
||||
- |
|
||||
cat > /tmp/frpc.toml <<'EOF'
|
||||
serverAddr = "82.157.255.195"
|
||||
serverPort = 7000
|
||||
|
||||
auth.method = "token"
|
||||
auth.token = "en.xjtu.edu.cn"
|
||||
|
||||
transport.poolCount = 5
|
||||
transport.heartbeatTimeout = -1
|
||||
|
||||
[[proxies]]
|
||||
name = "ReVoxelSeg_DICOM"
|
||||
type = "tcp"
|
||||
localIP = "revoxelseg_web"
|
||||
localPort = 4000
|
||||
remotePort = 10008
|
||||
EOF
|
||||
exec frpc -c /tmp/frpc.toml
|
||||
depends_on:
|
||||
revoxelseg_web:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user