Files
Pre_Seg_Server/.env
admin b5413066a0 添加Docker自包含部署分支
- 新增 Seg_Server_Docker 自包含部署内容,包含前后端、FastAPI、Celery、PostgreSQL、Redis、MinIO、演示视频和 DICOM 数据。

- 保留 demo 数据以支持恢复演示出厂设置,排除 SAM 2.1 .pt 权重并在 README 中补充下载命令。

- 补充 GPU 部署、backend/worker 镜像复用、frpc/frps + NPM 公网域名反代部署说明。

- 在 .env/.env.example 中用 # XXXX 标注局域网和公网域名部署需要修改的配置项。

- 添加部署分支 .gitignore,忽略本地模型权重、构建产物、缓存和日志。
2026-05-07 19:06:07 +08:00

45 lines
1.7 KiB
Bash

# 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
# 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=
FRONTEND_PORT=3000
BACKEND_PORT=8000
MINIO_PORT=9000
MINIO_CONSOLE_PORT=9001
POSTGRES_USER=seguser
POSTGRES_PASSWORD=segpass123
POSTGRES_DB=segserver
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
MINIO_SECURE=false
# Local directory containing SAM 2.1 checkpoints.
# Keep this relative path so the whole Seg_Server_Docker folder can be moved.
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"]
JWT_SECRET_KEY=change-this-to-a-long-random-production-secret
ACCESS_TOKEN_EXPIRE_MINUTES=1440
DEFAULT_ADMIN_USERNAME=admin
DEFAULT_ADMIN_PASSWORD=123456