46fd22c277
- 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>
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
mcp-server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: finn-mcp-server
|
|
|
|
# Environment configuration
|
|
environment:
|
|
FINN_CACHE_PATH: /app/data/finn.sqlite
|
|
# MCP HTTP server configuration
|
|
MCP_HOST: 0.0.0.0
|
|
MCP_PORT: 8010
|
|
|
|
# Python configuration
|
|
PYTHONUNBUFFERED: 1
|
|
# Optional: FINN/Eiendom.no rate limiting and retry configuration
|
|
# FINN_RATE_LIMIT_DELAY: 0.5
|
|
# HTTP_TIMEOUT: 30
|
|
# HTTP_MAX_RETRIES: 3
|
|
|
|
# Port mapping for HTTP access
|
|
ports:
|
|
- "8010:8010"
|
|
|
|
# Health check
|
|
healthcheck:
|
|
test: [ "CMD", "python", "-c", "import requests; requests.get('http://localhost:8010/health', timeout=5)" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# Resource limits (adjust based on your server)
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '1'
|
|
memory: 512M
|
|
|
|
# Restart policy
|
|
restart: unless-stopped
|
|
|
|
# Logging configuration
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
volumes:
|
|
- finn-cache:/app/data
|
|
|
|
volumes:
|
|
finn-cache:
|
|
# For development, you can override with:
|
|
# docker-compose -f docker-compose.yml -f docker-compose.override.yml up
|