Enhance Docker and Compose configurations; add health check endpoint and caching improvements

- Updated Dockerfile to include FINN_CACHE_PATH and create data directory.
- Modified docker-compose.prod.yml to expose port 8010 and adjust resource limits.
- Updated docker-compose.yml to include FINN_CACHE_PATH and ensure proper port mapping.
- Added health check endpoint in http_server.py for container orchestration.
- Improved caching logic in analysis.py and service.py for similar units.
- Refined scoring.py with updated scoring model and constants for better accuracy.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ole
2026-05-26 12:10:00 +00:00
parent d3f4bfa838
commit 46fd22c277
7 changed files with 315 additions and 233 deletions
+19 -15
View File
@@ -7,31 +7,35 @@ services:
mcp-server:
# Production image should be pre-built and tagged
image: finn-mcp:latest
# Environment overrides for production
environment:
PYTHONUNBUFFERED: 1
# Expose port for network access
ports:
- "8010:8010"
# More aggressive resource limits for production
deploy:
resources:
limits:
cpus: '4'
memory: 2G
reservations:
cpus: '2'
memory: 1G
# deploy:
# resources:
# limits:
# cpus: '4'
# memory: 2G
# reservations:
# cpus: '2'
# memory: 1G
# Restart policy
restart: always
# Security options
security_opt:
- no-new-privileges:true
# Read-only root filesystem (if cache is not persistent)
# read_only: true
# Logging configuration for production
logging:
driver: "json-file"
@@ -39,7 +43,7 @@ services:
max-size: "100m"
max-file: "10"
labels: "service=finn-mcp"
# Labels for monitoring/metadata
labels:
com.example.description: "FINN Eiendom.no MCP Server"