bmc_hub/docker-compose.yml
Christian 890bd6245d feat: Add template editing functionality and improve file loading logic
- Added an "Edit" button for templates in the templates list, redirecting to the template builder.
- Enhanced loadPendingFiles function to filter files by vendor ID, displaying a message if no files are found.
- Modified openTestModal to load vendor-specific files based on the selected template.
- Updated Ollama model configuration for improved JSON extraction.
- Refactored Ollama service to support different API formats based on model type.
- Implemented lazy loading of templates in TemplateService for better performance.
- Added VAT note extraction for invoice line items.
- Updated Docker Compose configuration for Ollama model settings.
2025-12-08 23:46:18 +01:00

73 lines
2.0 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: bmc-hub-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-bmc_hub}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-bmc_hub}
POSTGRES_DB: ${POSTGRES_DB:-bmc_hub}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "${POSTGRES_PORT:-5433}:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-bmc_hub}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- bmc-hub-network
# FastAPI Application
api:
build:
context: .
dockerfile: Dockerfile
container_name: bmc-hub-api
depends_on:
postgres:
condition: service_healthy
ports:
- "${API_PORT:-8001}:8000"
volumes:
- ./logs:/app/logs
- ./uploads:/app/uploads
- ./static:/app/static
- ./data:/app/data
# Mount for local development - live code reload
- ./app:/app/app:ro
- ./main.py:/app/main.py:ro
- ./scripts:/app/scripts:ro
# Mount OmniSync database for import (read-only)
- /Users/christianthomas/pakkemodtagelse/data:/omnisync_data:ro
env_file:
- .env
environment:
# Override database URL to point to postgres service
- DATABASE_URL=postgresql://${POSTGRES_USER:-bmc_hub}:${POSTGRES_PASSWORD:-bmc_hub}@postgres:5432/${POSTGRES_DB:-bmc_hub}
- ENABLE_RELOAD=false
- OLLAMA_MODEL=qwen3:4b # Bruger Chat API format
- OLLAMA_MODEL_FALLBACK=qwen2.5:3b # Backup model
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- bmc-hub-network
networks:
bmc-hub-network:
driver: bridge
volumes:
postgres_data:
driver: local