Files
KCGL/docker-compose.yml

51 lines
1.3 KiB
YAML
Raw Normal View History

services:
db:
image: pgvector/pgvector:pg15 # 换成这个
container_name: inventory_db
restart: always
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: 1234
POSTGRES_DB: inventory_system
volumes:
- ./pgdata_docker:/var/lib/postgresql/data # 这里保持不变,Docker会自动创建这个新文件夹
ports:
- "5435:5432"
backend:
build:
context: ./inventory-backend
container_name: inventory_api
restart: always
ports:
- "8000:8000"
volumes:
- ./inventory-backend:/app
2026-02-03 11:16:12 +08:00
- ./inventory-backend/uploads:/app/uploads
command: gunicorn -c gunicorn.conf.py run:app --reload
environment:
DATABASE_URL: postgresql://test:1234@db:5432/inventory_system
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"
depends_on:
- db
frontend:
build:
context: ./inventory-web
container_name: inventory_ui
restart: always
volumes:
- ./inventory-web:/app
- /app/node_modules
ports:
- "5175:5173"
depends_on:
- backend