feat: Enhance project and scenario creation with monitoring metrics
Some checks failed
CI / lint (push) Failing after 1m14s
CI / test (push) Has been skipped
CI / build (push) Has been skipped

- Added monitoring metrics for project creation success and error handling in `ProjectRepository`.
- Implemented similar monitoring for scenario creation in `ScenarioRepository`.
- Refactored `run_monte_carlo` function in `simulation.py` to include timing and success/error metrics.
- Introduced new CSS styles for headers, alerts, and navigation buttons in `main.css` and `projects.css`.
- Created a new JavaScript file for navigation logic to handle chevron buttons.
- Updated HTML templates to include new navigation buttons and improved styling for buttons.
- Added tests for reporting service and routes to ensure proper functionality and access control.
- Removed unused imports and optimized existing test files for better clarity and performance.
This commit is contained in:
2025-11-12 10:36:24 +01:00
parent f68321cd04
commit ce9c174b53
61 changed files with 2124 additions and 308 deletions

View File

@@ -0,0 +1,60 @@
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
APT_CACHE_URL: ${APT_CACHE_URL:-}
environment:
- ENVIRONMENT=development
- DEBUG=true
- LOG_LEVEL=DEBUG
# Override database to use local postgres service
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_USER=calminer
- DATABASE_PASSWORD=calminer_password
- DATABASE_NAME=calminer_db
- DATABASE_DRIVER=postgresql
# Development-specific settings
- CALMINER_EXPORT_MAX_ROWS=1000
- CALMINER_IMPORT_MAX_ROWS=10000
volumes:
# Mount source code for live reloading (if using --reload)
- .:/app:ro
# Override logs volume to local for easier access
- ./logs:/app/logs
ports:
- "8003:8003"
# Override command for development with reload
command:
[
"uvicorn",
"main:app",
"--host",
"0.0.0.0",
"--port",
"8003",
"--reload",
"--workers",
"1",
]
depends_on:
- postgres
restart: unless-stopped
postgres:
environment:
- POSTGRES_USER=calminer
- POSTGRES_PASSWORD=calminer_password
- POSTGRES_DB=calminer_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
postgres_data: