Files
finn-mcp/docker-compose.prod.yml
T
ole eb95b98111 Refactor and enhance various components of the FINN real estate analysis tool
- Updated docker-compose files to use local data volumes for development.
- Refactored analysis.py to improve code readability and performance, including changes to cache age calculations and hash computations.
- Enhanced cache.py to ensure the database directory is created if it doesn't exist and improved SQL query formatting.
- Modified cli.py to improve logging and statistics reporting for finn_ads.
- Updated config.py to streamline environment variable handling.
- Initialized the database eagerly in http_server.py to prevent runtime errors.
- Refactored mcp_server.py to slim down data structures and improve response formatting for API calls.
- Enhanced service.py to improve feedback handling and shortlist retrieval, ensuring enriched data is returned.
- Updated recompute_analysis_cache.py for better SQL query formatting.
2026-05-29 15:17:11 +00:00

74 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
# TODO: Remove on actual production deployment
volumes:
- ./data:/app/data
# Environment overrides for production
environment:
PYTHONUNBUFFERED: 1
# Expose port for network access
ports:
- "8011: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;
# }
# }