docker-compose.yml•1.03 kB
version: '3.8'
services:
mcp-server:
build:
context: .
dockerfile: Dockerfile
image: mcp-sendmail-server:latest
container_name: mcp-sendmail-server
ports:
- "8085:8080"
volumes:
# Persist logs outside container
- ./logs:/app/logs
environment:
# SMTP Configuration - Loaded from .env.sh (source .env.sh before docker compose up)
- SMTP_HOST=${SMTP_HOST:-localhost}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASSWORD}
# Server Configuration
- SERVER_HOST=${SERVER_HOST:-0.0.0.0}
- SERVER_PORT=${SERVER_PORT:-8080}
- DEBUG=${DEBUG:-false}
restart: unless-stopped
networks:
- mcp-network
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
mcp-network:
driver: bridge
volumes:
mcp-logs: