2026-01-27 15:50:23 +08:00
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
db:
|
2026-05-21 14:09:57 +08:00
|
|
|
|
image: pgvector/pgvector:pg15 # 换成这个
|
2026-01-27 15:50:23 +08:00
|
|
|
|
container_name: inventory_db
|
|
|
|
|
|
restart: always
|
|
|
|
|
|
environment:
|
|
|
|
|
|
POSTGRES_USER: test
|
|
|
|
|
|
POSTGRES_PASSWORD: 1234
|
|
|
|
|
|
POSTGRES_DB: inventory_system
|
|
|
|
|
|
volumes:
|
2026-05-21 14:09:57 +08:00
|
|
|
|
- ./pgdata_docker:/var/lib/postgresql/data # 这里保持不变,Docker会自动创建这个新文件夹
|
2026-01-27 15:50:23 +08:00
|
|
|
|
ports:
|
2026-04-14 08:56:47 +08:00
|
|
|
|
- "5435:5432"
|
2026-01-27 15:50:23 +08:00
|
|
|
|
|
|
|
|
|
|
backend:
|
|
|
|
|
|
build:
|
2026-04-14 08:56:47 +08:00
|
|
|
|
context: ./inventory-backend
|
2026-01-27 15:50:23 +08:00
|
|
|
|
container_name: inventory_api
|
|
|
|
|
|
restart: always
|
|
|
|
|
|
ports:
|
|
|
|
|
|
- "8000:8000"
|
|
|
|
|
|
volumes:
|
2026-04-14 08:56:47 +08:00
|
|
|
|
- ./inventory-backend:/app
|
2026-02-03 11:16:12 +08:00
|
|
|
|
- ./inventory-backend/uploads:/app/uploads
|
2026-01-27 15:50:23 +08:00
|
|
|
|
command: gunicorn -c gunicorn.conf.py run:app --reload
|
|
|
|
|
|
environment:
|
|
|
|
|
|
DATABASE_URL: postgresql://test:1234@db:5432/inventory_system
|
2026-07-17 14:27:32 +08:00
|
|
|
|
MAIL_ENABLED: "true"
|
|
|
|
|
|
MAIL_SERVER: smtp.mxhichina.com
|
|
|
|
|
|
MAIL_PORT: "465"
|
|
|
|
|
|
MAIL_USERNAME: wms@iris-rs.cn
|
|
|
|
|
|
MAIL_PASSWORD: Q7nYyyESWlaThKjx
|
|
|
|
|
|
MAIL_DEFAULT_SENDER: wms@iris-rs.cn
|
|
|
|
|
|
MAIL_USE_SSL: "true"
|
|
|
|
|
|
MAIL_USE_TLS: "false"
|
2026-01-27 15:50:23 +08:00
|
|
|
|
depends_on:
|
|
|
|
|
|
- db
|
|
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
|
build:
|
|
|
|
|
|
context: ./inventory-web
|
|
|
|
|
|
container_name: inventory_ui
|
|
|
|
|
|
restart: always
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
- ./inventory-web:/app
|
2026-04-14 08:56:47 +08:00
|
|
|
|
- /app/node_modules
|
2026-01-27 15:50:23 +08:00
|
|
|
|
ports:
|
2026-04-14 08:56:47 +08:00
|
|
|
|
- "5175:5173"
|
2026-01-27 15:50:23 +08:00
|
|
|
|
depends_on:
|
2026-05-21 14:09:57 +08:00
|
|
|
|
- backend
|