## 新增功能 - material_base 表新增 reference_price 列(NUMERIC(10,2)) - 基础信息 list.vue / buyOdoo.vue 页面增加「参考价格」列展示和编辑 - 新增 material_list:referencePrice 权限元素,支持按角色控制可见性 ## Bug 修复 - 入库三页面(buy/product/semi)公司筛选:非超管用户 company=ALL 不再传给旧版后端 - 基础信息两页面(list/buyOdoo):buyOdoo 增加 v-if=isSuperAdmin 与 list.vue 行为统一 - company=ALL 默认值在各页面 getList/fetchData 中自动过滤,兼容旧版后端 ## 运维优化 - docker-compose.prod.yml 增加 models_prod 卷挂载,CLIP模型持久化免重复上传 - deploy_code.sh 增加 models_prod 目录检查与模型文件存在性告警
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# --- 数据库 (已修改为自带 pgvector 的镜像) ---
|
|
db:
|
|
image: pgvector/pgvector:pg15
|
|
container_name: inventory_db_prod
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: prod_user
|
|
POSTGRES_PASSWORD: StrongPassword123!
|
|
POSTGRES_DB: inventory_system
|
|
volumes:
|
|
# 数据卷保持不变,你的历史数据不会丢失!
|
|
- ./pgdata_prod:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
# --- 后端 (Flask) (保持不变) ---
|
|
backend:
|
|
build:
|
|
context: ./inventory-backend
|
|
container_name: inventory_api_prod
|
|
restart: always
|
|
expose:
|
|
- "8000"
|
|
volumes:
|
|
- ./uploads_prod:/app/uploads
|
|
- ./models_prod:/app/models
|
|
command: gunicorn -c gunicorn.conf.py run:app
|
|
environment:
|
|
DATABASE_URL: postgresql://prod_user:StrongPassword123!@db:5432/inventory_system
|
|
depends_on:
|
|
- db
|
|
|
|
# --- 前端 (Nginx + Vue) (包含 HTTPS 配置) ---
|
|
frontend:
|
|
build:
|
|
context: ./inventory-web
|
|
dockerfile: Dockerfile.prod
|
|
container_name: inventory_ui_prod
|
|
restart: always
|
|
ports:
|
|
- "80:80" # HTTP 端口
|
|
- "443:443" # 【新增】HTTPS 端口
|
|
volumes:
|
|
# 【新增】挂载 SSL 证书
|
|
# 左边是服务器路径 ./ssl/nginx.crt
|
|
# 右边是容器内路径 /etc/nginx/ssl/nginx.crt (必须和报错日志里的一致)
|
|
- ./ssl/nginx.crt:/etc/nginx/ssl/nginx.crt
|
|
- ./ssl/nginx.key:/etc/nginx/ssl/nginx.key
|
|
depends_on:
|
|
- backend |