2026-05-21-14-19-12 通用Docker Release配置

This commit is contained in:
Codex
2026-05-21 14:24:59 +08:00
parent 57415a1a0b
commit 3ad83a64a9
6 changed files with 108 additions and 156 deletions

View File

@@ -1,27 +1,35 @@
# ReVoxelSeg DICOM 独立 Docker 本机部署版。
# 在本目录执行docker compose -f docker_compose.yaml up -d --build
# 局域网访问http://192.168.3.11:4000/
# 公网访问https://revoxel.huijutec.cn/
# ReVoxelSeg DICOM 通用 Docker 部署版。
# 默认只启动 Web 服务;如需 FRPC先复制 .env.example 为 .env 并填写参数,
# 再执行docker compose --profile frpc up -d --build
name: revoxelseg-dicom-standalone
name: revoxelseg-dicom-generic
services:
revoxelseg_web:
image: revoxelseg-dicom:standalone-20260521
image: ${REVOXELSEG_IMAGE:-revoxelseg-dicom:generic}
build:
context: .
dockerfile: Dockerfile
args:
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
NO_PROXY: ${NO_PROXY:-localhost,127.0.0.1,revoxelseg_web,revoxelseg_frpc}
restart: unless-stopped
ports:
- "4000:4000"
- "${HOST_PORT:-4000}:4000"
environment:
NODE_ENV: production
PORT: 4000
APP_URL: http://192.168.3.11:4000
TRUST_PROXY: "true"
APP_URL: ${APP_URL:-http://localhost:4000}
TRUST_PROXY: ${TRUST_PROXY:-true}
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
http_proxy: ${HTTP_PROXY:-}
https_proxy: ${HTTPS_PROXY:-}
NO_PROXY: ${NO_PROXY:-localhost,127.0.0.1,revoxelseg_web,revoxelseg_frpc}
volumes:
- ./data:/app/WebSite/data
- ./exports:/app/WebSite/exports
- ${REVOXELSEG_DATA_DIR:-./data}:/app/WebSite/data
- ${REVOXELSEG_EXPORTS_DIR:-./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
@@ -30,31 +38,32 @@ services:
start_period: 20s
revoxelseg_frpc:
image: snowdreamtech/frpc:latest
image: ${FRPC_IMAGE:-snowdreamtech/frpc:latest}
restart: unless-stopped
profiles:
- frpc
entrypoint: ["/bin/sh"]
command:
- -c
- |
cat > /tmp/frpc.toml <<'EOF'
serverAddr = "82.157.255.195"
serverPort = 7000
cat > /tmp/frpc.toml <<EOF
serverAddr = "${FRP_SERVER_ADDR}"
serverPort = ${FRP_SERVER_PORT}
auth.method = "token"
auth.token = "en.xjtu.edu.cn"
auth.method = "${FRP_AUTH_METHOD}"
auth.token = "${FRP_AUTH_TOKEN}"
transport.poolCount = 5
transport.heartbeatTimeout = -1
transport.poolCount = ${FRP_POOL_COUNT}
transport.heartbeatTimeout = ${FRP_HEARTBEAT_TIMEOUT}
[[proxies]]
name = "ReVoxelSeg_DICOM"
name = "${FRP_PROXY_NAME}"
type = "tcp"
localIP = "revoxelseg_web"
localPort = 4000
remotePort = 10008
remotePort = ${FRP_REMOTE_PORT}
EOF
exec frpc -c /tmp/frpc.toml
depends_on:
revoxelseg_web:
condition: service_healthy