45 lines
965 B
YAML
45 lines
965 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: inventory_db
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: test
|
|
POSTGRES_PASSWORD: 1234
|
|
POSTGRES_DB: inventory_system
|
|
volumes:
|
|
- ./pgdata_docker:/var/lib/postgresql/data
|
|
ports:
|
|
- "5435:5432"
|
|
|
|
backend:
|
|
build:
|
|
context: ./inventory-backend
|
|
container_name: inventory_api
|
|
restart: always
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./inventory-backend:/app
|
|
- ./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
|