2.4 KiB
2.4 KiB
Operations And Configuration
Runtime Services
docker-compose.yml defines the runtime stack:
db(Postgres 16, port5432)redis(Redis 7, port6379)typesense(Typesense 29, port8108)api(FastAPI backend, port8000)worker(RQ background worker)frontend(Vite UI, port5173)
Named Volumes
Persistent volumes:
db-dataredis-datadcm-storagetypesense-data
Reset all persisted runtime data:
docker compose down -v
Operational Commands
Start or rebuild stack:
docker compose up --build -d
Stop stack:
docker compose down
Tail logs:
docker compose logs -f
Backend Configuration
Settings source:
- Runtime settings class:
backend/app/core/config.py - API settings persistence:
backend/app/services/app_settings.py
Key environment variables used by api and worker in compose:
APP_ENVDATABASE_URLREDIS_URLSTORAGE_ROOTPUBLIC_BASE_URLCORS_ORIGINS(API service)TYPESENSE_PROTOCOLTYPESENSE_HOSTTYPESENSE_PORTTYPESENSE_API_KEYTYPESENSE_COLLECTION_NAME
Selected defaults from Settings (backend/app/core/config.py):
upload_chunk_size = 4194304max_zip_members = 250max_zip_depth = 2max_text_length = 500000default_openai_model = "gpt-4.1-mini"default_openai_timeout_seconds = 45default_summary_model = "gpt-4.1-mini"default_routing_model = "gpt-4.1-mini"typesense_timeout_seconds = 120typesense_num_retries = 0
Frontend Configuration
Frontend runtime API target:
VITE_API_BASEindocker-compose.ymlfrontend service
Frontend local commands:
cd frontend && npm run dev
cd frontend && npm run build
cd frontend && npm run preview
Settings Persistence
Application-level settings managed from the UI are persisted by backend settings service:
- file path:
<STORAGE_ROOT>/settings.json - endpoints:
/api/v1/settings,/api/v1/settings/reset,/api/v1/settings/handwriting
Settings include:
- upload defaults
- display options
- provider configuration
- OCR, summary, and routing task settings
- predefined paths and tags
- handwriting-style clustering settings
Validation Checklist
After operational or configuration changes, verify:
GET /api/v1/healthis healthy- frontend can list, upload, and search documents
- processing worker logs show successful task execution
- settings save or reset works and persists after restart