Files
geMoldInsight/.env.example
T
cjw e65dcc2d39 🔧 build(deploy): 端口默认值统一 10003/10004——前端入口固定 10003
约定"容器内部端口无所谓,重要的是宿主机端口;前端 = 10003"。

- .env.example 端口段重写:移除冗余 HOST/PORT(uvicorn 命令硬编码,
  无人读 env)+ 移除误导注释;FRONTEND_PORT/BACKEND_PORT/MOLDINSIGHT_PORT
  默认 10003,INVENTORY_PORT 默认 10004
- docker-compose.yml frontend 默认 80→10003、backend 8000→10003,删除
  backend service 内冗余 HOST/PORT env
- docker-compose.moldinsight.yml / docker-compose.inventory.yml 默认
  端口同步
- DEPLOY_PORT §3 / PORT_CONFIG §1 §2 端口映射示例同步
- STATUS 补录

验证:yaml 渲染端口映射 unified frontend 10003→80、backend 10003→8000,
moldinsight 10003→8000,inventory 10004→8001。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-26 20:45:38 +08:00

92 lines
3.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ================================
# 端口配置 — 唯一修改宿主机端口的地方
# ================================
# 容器内部端口无所谓,重要的是映射到宿主机的端口。
# 约定:前端页面 = 10003;后端 API 不直接暴露(仅经前端 Nginx 反代)。
# gemold(moldinsight)API 对外端口(仅 moldinsight-only / 直接调试时用)
MOLDINSIGHT_PORT=10003
# inventory API 对外端口(仅 inventory-only 模式用)
INVENTORY_PORT=10004
# unified 模式下 frontend Nginx 对外端口(即浏览器入口)
FRONTEND_PORT=10003
# 兼容旧字段名(部分部署脚本仍引用)
BACKEND_PORT=10003
# ================================
DEBUG=false
# 日志配置
# LOG_FORMAT: json(生产默认,结构化输出)/ text(开发默认,人可读)
# LOG_LEVEL: DEBUG / INFO / WARNING / ERROR
LOG_FORMAT=json
LOG_LEVEL=INFO
# 文件处理配置
UPLOAD_DIR=./uploads
MAX_FILE_SIZE=104857600
ALLOWED_EXTENSIONS=.stp,.step,.stp.gz
# 几何处理配置
POINTCLOUD_SAMPLE_COUNT=10000
MESH_QUALITY=high
PARALLEL_PROCESSING=true
# 数据库配置(服务器已部署,请填写真实地址)
DB_HOST=localhost
DB_PORT=5432
# 是否在应用启动时自动执行 alembic 迁移(默认 true,保持单机开发体验)。
# 多副本/容器编排部署建议设为 false:多个实例同时启动会并发迁移,
# 改由部署流程单点执行 alembic CLI 或 python -m shared.database.init_db
AUTO_MIGRATE=true
DB_NAME=moldinsight
DB_USER=moldinsight_user
DB_PASSWORD=moldinsight_password
# RustFS / MinIO 兼容对象存储配置(服务器已部署,请填写真实地址)
RUSTFS_ENDPOINT=http://localhost:9000
RUSTFS_ACCESS_KEY=your-access-key
RUSTFS_SECRET_KEY=your-secret-key
RUSTFS_TIMEOUT=30
RUSTFS_PRESIGNED_URL_EXPIRES=3600
# Redis 配置(服务器已部署,请填写真实地址)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# JWT认证配置
SECRET_KEY=your-secret-key-change-in-production-min-32-chars
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=1440
# CORS 白名单(逗号分隔,不设置则默认为 [*],生产环境务必设置)
# CORS_ORIGINS=http://localhost:5173,http://localhost:8000,http://localhost:8001,https://your-domain.com
# 管理员账户配置
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change-this-to-a-secure-password
ADMIN_EMAIL=admin@gemold.com
ADMIN_FULL_NAME=系统管理员
# FreeCAD 验证配置(可选)
# 启用后会增加处理时间,默认禁用
ENABLE_FREECAD_VERIFICATION=false
FREECAD_VERIFICATION_TIMEOUT=120
# LLM 增强分析配置(可选)
# 启用后自动生成模具设计评审报告和分模方向推荐
# 支持 OpenAI 兼容 API(OpenAI / DeepSeek / vLLM / Ollama 等)
LLM_ENABLED=false
LLM_API_URL=https://api.openai.com/v1
LLM_API_KEY=sk-your-api-key
LLM_MODEL=gpt-4o-mini
LLM_TIMEOUT=60
LLM_MAX_TOKENS=2000
# Celery/OCC 吞吐调优(可选,默认值在 compose 的 ${CELERY_CONCURRENCY:-2};
# concurrency 即 OCC 并行分析数,见 docs/topics/performance/OCC_THROUGHPUT.md)
# CELERY_CONCURRENCY=2
# CELERY_MAX_TASKS_PER_CHILD=50