mcrentcast/docker-compose.yml
Ryan Malloy 8b4f9fbfff Initial implementation of mcrentcast MCP server
- Complete Rentcast API integration with all endpoints
- Intelligent caching system with hit/miss tracking
- Rate limiting with exponential backoff
- User confirmation system with MCP elicitation support
- Docker Compose setup with dev/prod modes
- PostgreSQL database for persistence
- Comprehensive test suite foundation
- Full project structure and documentation
2025-09-09 08:41:23 -06:00

95 lines
2.5 KiB
YAML

services:
mcrentcast-server:
build:
context: .
target: ${MODE:-development}
volumes:
- ./src:/app/src:ro
- ./docs:/app/docs:ro
- ./data:/app/data
- ./.env:/app/.env:ro
environment:
- MODE=${MODE:-development}
- DATABASE_URL=sqlite:///./data/mcrentcast.db
- RENTCAST_API_KEY=${RENTCAST_API_KEY}
- RENTCAST_BASE_URL=${RENTCAST_BASE_URL}
- DAILY_API_LIMIT=${DAILY_API_LIMIT:-100}
- MONTHLY_API_LIMIT=${MONTHLY_API_LIMIT:-1000}
- REQUESTS_PER_MINUTE=${REQUESTS_PER_MINUTE:-3}
- CACHE_TTL_HOURS=${CACHE_TTL_HOURS:-24}
- MAX_CACHE_SIZE_MB=${MAX_CACHE_SIZE_MB:-100}
expose:
- "3001"
labels:
caddy: api.${DOMAIN}
caddy.reverse_proxy: "{{upstreams}}"
caddy.header.Access-Control-Allow-Origin: "https://${DOMAIN}"
caddy.header.Access-Control-Allow-Methods: "GET, POST, PUT, DELETE, OPTIONS"
caddy.header.Access-Control-Allow-Headers: "Content-Type, Authorization"
networks:
- caddy
- internal
restart: unless-stopped
depends_on:
- mcrentcast-db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
mcrentcast-db:
image: postgres:16-alpine
environment:
POSTGRES_DB: mcrentcast
POSTGRES_USER: mcrentcast
POSTGRES_PASSWORD: ${DB_PASSWORD:-mcrentcast_dev_password}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
networks:
- internal
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mcrentcast"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: ./frontend
target: ${MODE:-development}
volumes:
- ./frontend/src:/app/src:ro
- ./frontend/public:/app/public:ro
- ./.env:/app/.env:ro
environment:
- MODE=${MODE:-development}
- PUBLIC_DOMAIN=${DOMAIN}
- PUBLIC_API_URL=https://api.${DOMAIN}
expose:
- "80"
labels:
caddy: ${DOMAIN}
caddy.reverse_proxy: "{{upstreams}}"
networks:
- caddy
restart: unless-stopped
depends_on:
- mcrentcast-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
caddy:
external: true
internal:
driver: bridge
volumes:
postgres_data:
driver: local