added inventory, updated DB
This commit is contained in:
parent
f218350959
commit
10c51f6825
16528 changed files with 147743 additions and 79 deletions
|
|
@ -13,6 +13,7 @@ services:
|
|||
- "./main.py:/app/main.py"
|
||||
- "./db_async.py:/app/db_async.py"
|
||||
- "./static:/app/static"
|
||||
- "./icons:/app/icons"
|
||||
- "./alembic:/app/alembic"
|
||||
- "./alembic.ini:/app/alembic.ini"
|
||||
environment:
|
||||
|
|
@ -56,6 +57,49 @@ services:
|
|||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
# Inventory Service: Separate microservice for item data processing
|
||||
inventory-service:
|
||||
build: ./inventory-service
|
||||
ports:
|
||||
- "127.0.0.1:8766:8000"
|
||||
depends_on:
|
||||
- inventory-db
|
||||
volumes:
|
||||
- "./inventory-service:/app"
|
||||
environment:
|
||||
DATABASE_URL: "postgresql://inventory_user:${INVENTORY_DB_PASSWORD}@inventory-db:5432/inventory_db"
|
||||
LOG_LEVEL: "${LOG_LEVEL:-INFO}"
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# Separate database for inventory service
|
||||
inventory-db:
|
||||
image: postgres:14
|
||||
container_name: inventory-db
|
||||
environment:
|
||||
POSTGRES_DB: inventory_db
|
||||
POSTGRES_USER: inventory_user
|
||||
POSTGRES_PASSWORD: "${INVENTORY_DB_PASSWORD}"
|
||||
volumes:
|
||||
- inventory-data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U inventory_user"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# Grafana service for visualization and dashboards
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
|
|
@ -90,4 +134,5 @@ services:
|
|||
max-file: "3"
|
||||
|
||||
volumes:
|
||||
timescale-data:
|
||||
timescale-data:
|
||||
inventory-data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue