2026-09-24 15:28:13 +08:00
|
|
|
# geMoldInsight — inventory-only 模式
|
|
|
|
|
#
|
|
|
|
|
# 一键启动:
|
|
|
|
|
# docker compose -f docker-compose.inventory.yml up -d
|
|
|
|
|
#
|
|
|
|
|
# 服务清单:仅 inventory 后端
|
|
|
|
|
# 不含前端、不含 moldinsight、不含 Celery worker。
|
|
|
|
|
#
|
|
|
|
|
# 基础设施:仅依赖 PostgreSQL + Redis;不依赖 RustFS / MinIO 对象存储,
|
|
|
|
|
# 不挂 uploads/html 命名卷(inventory 无文件分析链路)。
|
2026-09-24 16:09:26 +08:00
|
|
|
# 注意:服务未声明 profiles(避免裸 up 报 "no service selected"),
|
|
|
|
|
# 模式切换唯一入口是 -f 文件名。
|
2026-09-24 15:28:13 +08:00
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
|
# 公共环境变量(inventory 子集:DB / Redis / 认证 / 启动参数)
|
|
|
|
|
# ---------------------------------------------------------------
|
|
|
|
|
x-inventory-env: &inventory_env
|
|
|
|
|
DB_HOST: ${DB_HOST}
|
|
|
|
|
DB_PORT: ${DB_PORT:-5432}
|
|
|
|
|
DB_NAME: ${DB_NAME:-moldinsight}
|
|
|
|
|
DB_USER: ${DB_USER}
|
|
|
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
|
|
|
REDIS_HOST: ${REDIS_HOST}
|
|
|
|
|
REDIS_PORT: ${REDIS_PORT:-6379}
|
|
|
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
|
|
|
|
|
SECRET_KEY: ${SECRET_KEY:?SECRET_KEY 未配置:请在 .env 中设置}
|
|
|
|
|
ALGORITHM: ${ALGORITHM:-HS256}
|
|
|
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-1440}
|
|
|
|
|
DEBUG: ${DEBUG:-false}
|
|
|
|
|
SERVE_FRONTEND_STATIC: ${SERVE_FRONTEND_STATIC:-false}
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
inventory:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: deploy/Dockerfile.inventory
|
|
|
|
|
image: gemold-inventory:latest
|
|
|
|
|
container_name: gemold_inventory
|
|
|
|
|
command: ["python", "-m", "uvicorn", "entrypoints.inventory:app", "--host", "0.0.0.0", "--port", "8001"]
|
|
|
|
|
ports:
|
|
|
|
|
- "${INVENTORY_PORT:-8001}:8001"
|
|
|
|
|
environment:
|
|
|
|
|
<<: *inventory_env
|
|
|
|
|
HOST: 0.0.0.0
|
|
|
|
|
PORT: "8001"
|
|
|
|
|
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
|
|
|
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?ADMIN_PASSWORD 未配置:请在 .env 中设置}
|
|
|
|
|
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@gemold.com}
|
|
|
|
|
ADMIN_FULL_NAME: ${ADMIN_FULL_NAME:-系统管理员}
|
|
|
|
|
AUTO_MIGRATE: ${AUTO_MIGRATE:-true}
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
networks:
|
|
|
|
|
- gemold_network
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
gemold_network:
|
|
|
|
|
name: gemold_network
|
|
|
|
|
driver: bridge
|