docker-compose.prod.yml•1.43 kB
services:
# Hostaway MCP Server - Production Configuration with Security
hostaway-mcp:
build:
context: .
dockerfile: Dockerfile.prod
container_name: hostaway-mcp-server
ports:
- "8080:8080" # Internal port only
env_file:
- .env # Environment variables from deployment workflow
restart: always # Always restart in production
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8080/health', timeout=5.0).raise_for_status()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- mcp-network
# Nginx Reverse Proxy with SSL
nginx:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "80:80" # HTTP (redirects to HTTPS)
- "443:443" # HTTPS
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certbot/conf:/etc/letsencrypt:ro
- ./certbot/www:/var/www/certbot:ro
restart: always
depends_on:
- hostaway-mcp
networks:
- mcp-network
# Certbot for SSL certificates
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
- mcp-network
networks:
mcp-network:
driver: bridge