配置公网 docker 部署

This commit is contained in:
2026-05-08 00:32:02 +08:00
parent 8b4aa609c8
commit 12c263f0f6
7 changed files with 27 additions and 22 deletions

15
.env
View File

@@ -1,15 +1,15 @@
# Copy this file to .env before running docker compose.
# XXXX LAN access: set PUBLIC_HOST to the machine IP, for example 192.168.3.11.
# XXXX Public-domain access through frpc/frps + NPM: set PUBLIC_HOST to the external frontend host, for example seg.example.com.
PUBLIC_HOST=192.168.3.11
PUBLIC_HOST=seg.huijutec.cn
# XXXX Frontend build-time API/WebSocket endpoints.
# LAN default can stay empty because the frontend infers http://<browser-host>:8000.
# Public-domain example:
# VITE_API_BASE_URL=https://seg-api.example.com
# VITE_WS_PROGRESS_URL=wss://seg-api.example.com/ws/progress
VITE_API_BASE_URL=
VITE_WS_PROGRESS_URL=
VITE_API_BASE_URL=https://seg-api.huijutec.cn
VITE_WS_PROGRESS_URL=wss://seg-api.huijutec.cn/ws/progress
FRONTEND_PORT=3000
BACKEND_PORT=8000
@@ -24,10 +24,11 @@ MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
# XXXX Browser-facing MinIO endpoint used to generate image/frame presigned URLs.
# LAN example: 192.168.3.11:9000 and MINIO_SECURE=false
# Public-domain example: seg-minio.example.com and MINIO_SECURE=true
MINIO_PUBLIC_ENDPOINT=192.168.3.11:9000
# LAN example: 192.168.3.11:9000 with MINIO_SECURE=false
# Public-domain example: seg-minio.example.com with MINIO_PUBLIC_SECURE=true
MINIO_PUBLIC_ENDPOINT=seg-minio.huijutec.cn
MINIO_SECURE=false
MINIO_PUBLIC_SECURE=true
# Local directory containing SAM 2.1 checkpoints.
# Keep this relative path so the whole Seg_Server_Docker folder can be moved.
@@ -36,7 +37,7 @@ SAM_MODELS_DIR=./models
# XXXX Must include every browser origin that will open the frontend.
# LAN example: ["http://192.168.3.11:3000","http://localhost:3000","http://127.0.0.1:3000"]
# Public-domain example: ["https://seg.example.com"]
CORS_ORIGINS=["http://192.168.3.11:3000","http://localhost:3000","http://127.0.0.1:3000"]
CORS_ORIGINS=["https://seg.huijutec.cn","http://seg.huijutec.cn","http://localhost:3000","http://127.0.0.1:3000"]
JWT_SECRET_KEY=change-this-to-a-long-random-production-secret
ACCESS_TOKEN_EXPIRE_MINUTES=1440