Files
KCGL/docker-compose.yml

44 lines
1.0 KiB
YAML
Raw Normal View History

version: '3.8'
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
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