61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
# ReVoxelSeg DICOM 本机 Docker 部署版。
|
||
# 运行位置:项目根目录下执行 `docker compose -f Docker部署/本机/docker_compose.yaml up -d --build`
|
||
# 局域网访问:http://192.168.3.11:4000/
|
||
# 公网访问:NPM 反向代理将 revoxel.huijutec.cn 转发到 FRP 服务端 10008 后生效。
|
||
|
||
name: revoxelseg-dicom-local
|
||
|
||
services:
|
||
revoxelseg_web:
|
||
image: revoxelseg-dicom:web-local-20260524-lock
|
||
build:
|
||
context: ../..
|
||
dockerfile: Docker部署/Dockerfile
|
||
restart: unless-stopped
|
||
ports:
|
||
- "4000:4000"
|
||
environment:
|
||
NODE_ENV: production
|
||
PORT: 4000
|
||
APP_URL: http://192.168.3.11:4000
|
||
TRUST_PROXY: "true"
|
||
volumes:
|
||
- ./data:/app/WebSite/data
|
||
- ./exports:/app/WebSite/exports
|
||
- ./locked-results:/app/项目数据/锁定结果
|
||
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
|