- Added a new column `subscriptions_locked` to the `customers` table to manage subscription access. - Implemented a script to create new modules from a template, including updates to various files (module.json, README.md, router.py, views.py, and migration SQL). - Developed a script to import BMC Office subscriptions from an Excel file into the database, including error handling and statistics reporting. - Created a script to lookup and update missing CVR numbers using the CVR.dk API. - Implemented a script to relink Hub customers to e-conomic customer numbers based on name matching. - Developed scripts to sync CVR numbers from Simply-CRM and vTiger to the local customers database.
119 lines
4.6 KiB
Plaintext
119 lines
4.6 KiB
Plaintext
# =====================================================
|
|
# POSTGRESQL DATABASE - Local Development
|
|
# =====================================================
|
|
DATABASE_URL=postgresql://bmc_hub:bmc_hub@postgres:5432/bmc_hub
|
|
|
|
# Database credentials (bruges af docker-compose)
|
|
POSTGRES_USER=bmc_hub
|
|
POSTGRES_PASSWORD=bmc_hub
|
|
POSTGRES_DB=bmc_hub
|
|
POSTGRES_PORT=5433 # Changed from 5432 to avoid conflicts with other services
|
|
|
|
# =====================================================
|
|
# API CONFIGURATION
|
|
# =====================================================
|
|
API_HOST=0.0.0.0
|
|
API_PORT=8001 # Changed from 8000 to avoid conflicts with other services
|
|
ENABLE_RELOAD=false # Set to true for live code reload (causes log spam in Docker)
|
|
|
|
# =====================================================
|
|
# SECURITY
|
|
# =====================================================
|
|
SECRET_KEY=change-this-in-production-use-random-string
|
|
CORS_ORIGINS=http://localhost:8000,http://localhost:3000
|
|
|
|
# =====================================================
|
|
# LOGGING
|
|
# =====================================================
|
|
LOG_LEVEL=INFO
|
|
LOG_FILE=logs/app.log
|
|
|
|
# =====================================================
|
|
# GITHUB/GITEA REPOSITORY (Optional - for reference)
|
|
# =====================================================
|
|
# Repository: https://g.bmcnetworks.dk/ct/bmc_hub
|
|
GITHUB_REPO=ct/bmc_hub
|
|
|
|
# =====================================================
|
|
# e-conomic Integration (Optional)
|
|
# =====================================================
|
|
# Get credentials from e-conomic Settings -> Integrations -> API
|
|
ECONOMIC_API_URL=https://restapi.e-conomic.com
|
|
ECONOMIC_APP_SECRET_TOKEN=your_app_secret_token_here
|
|
ECONOMIC_AGREEMENT_GRANT_TOKEN=your_agreement_grant_token_here
|
|
|
|
# 🚨 SAFETY SWITCHES - Beskytter mod utilsigtede ændringer
|
|
ECONOMIC_READ_ONLY=true # Set to false ONLY after testing
|
|
ECONOMIC_DRY_RUN=true # Set to false ONLY when ready for production writes
|
|
|
|
# =====================================================
|
|
# vTiger CRM Integration (Optional)
|
|
# =====================================================
|
|
VTIGER_URL=https://your-instance.od2.vtiger.com
|
|
VTIGER_USERNAME=your_username@yourdomain.com
|
|
VTIGER_API_KEY=your_api_key_or_access_key
|
|
VTIGER_PASSWORD=your_password_if_using_basic_auth
|
|
|
|
# =====================================================
|
|
# TIME TRACKING MODULE - Isolated Settings
|
|
# =====================================================
|
|
|
|
# vTiger Integration Safety Flags
|
|
TIMETRACKING_VTIGER_READ_ONLY=true # 🚨 Bloker ALLE skrivninger til vTiger
|
|
TIMETRACKING_VTIGER_DRY_RUN=true # 🚨 Log uden at synkronisere
|
|
|
|
# e-conomic Integration Safety Flags
|
|
TIMETRACKING_ECONOMIC_READ_ONLY=true # 🚨 Bloker ALLE skrivninger til e-conomic
|
|
TIMETRACKING_ECONOMIC_DRY_RUN=true # 🚨 Log uden at eksportere
|
|
TIMETRACKING_EXPORT_TYPE=draft # draft|booked (draft er sikrest)
|
|
|
|
# Business Logic Settings
|
|
TIMETRACKING_DEFAULT_HOURLY_RATE=850.00 # DKK pr. time (fallback hvis kunde ikke har rate)
|
|
TIMETRACKING_AUTO_ROUND=true # Auto-afrund til nærmeste interval
|
|
TIMETRACKING_ROUND_INCREMENT=0.5 # Afrundingsinterval (0.25, 0.5, 1.0)
|
|
TIMETRACKING_ROUND_METHOD=up # up (op til), nearest (nærmeste), down (ned til)
|
|
TIMETRACKING_REQUIRE_APPROVAL=true # Kræv manuel godkendelse
|
|
|
|
# =====================================================
|
|
# OLLAMA AI Integration (Optional - for document extraction)
|
|
# =====================================================
|
|
OLLAMA_ENDPOINT=http://ai_direct.cs.blaahund.dk
|
|
OLLAMA_MODEL=qwen2.5-coder:7b
|
|
|
|
# =====================================================
|
|
# COMPANY INFO
|
|
# =====================================================
|
|
OWN_CVR=29522790 # BMC Denmark ApS - ignore when detecting vendors
|
|
|
|
# =====================================================
|
|
# FILE UPLOAD
|
|
# =====================================================
|
|
UPLOAD_DIR=uploads
|
|
MAX_FILE_SIZE_MB=50
|
|
|
|
# =====================================================
|
|
# MODULE SYSTEM - Dynamic Feature Loading
|
|
# =====================================================
|
|
# Enable/disable entire module system
|
|
MODULES_ENABLED=true
|
|
|
|
# Directory for dynamic modules (default: app/modules)
|
|
MODULES_DIR=app/modules
|
|
|
|
# Auto-reload modules on changes (dev only, requires restart)
|
|
MODULES_AUTO_RELOAD=true
|
|
|
|
# =====================================================
|
|
# MODULE-SPECIFIC CONFIGURATION
|
|
# =====================================================
|
|
# Pattern: MODULES__{MODULE_NAME}__{KEY}
|
|
# Example module configuration:
|
|
|
|
# MODULES__INVOICE_OCR__READ_ONLY=true
|
|
# MODULES__INVOICE_OCR__DRY_RUN=true
|
|
# MODULES__INVOICE_OCR__API_KEY=secret123
|
|
|
|
# MODULES__MY_FEATURE__READ_ONLY=false
|
|
# MODULES__MY_FEATURE__DRY_RUN=false
|
|
# MODULES__MY_FEATURE__SOME_SETTING=value
|