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>
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
# Production configuration for docker-compose
|
|
# Usage: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
|
|
|
version: '3.9'
|
|
|
|
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
|
|
|
|
# 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"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "10"
|
|
labels: "service=finn-mcp"
|
|
|
|
# Labels for monitoring/metadata
|
|
labels:
|
|
com.example.description: "FINN Eiendom.no MCP Server"
|
|
com.example.version: "0.1.0"
|
|
maintainer: "your-email@example.com"
|
|
|
|
# Example reverse proxy configuration (nginx):
|
|
# Place this on your host server
|
|
# server {
|
|
# listen 8010;
|
|
# server_name your-domain.com;
|
|
#
|
|
# location / {
|
|
# proxy_pass http://localhost:8010;
|
|
# proxy_http_version 1.1;
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
# proxy_set_header Connection "upgrade";
|
|
# proxy_set_header Host $host;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
# proxy_read_timeout 86400;
|
|
# }
|
|
# }
|