docker-compose.ymlβ’1.05 kB
version: '3.8'
services:
mcp-server:
build:
context: .
dockerfile: Dockerfile
container_name: simdoc-mcp
ports:
- "${MCP_PORT:-8080}:8080"
environment:
# Backend API endpoint (REQUIRED - set in .env file)
- BACKEND_URL=${BACKEND_URL:?BACKEND_URL must be set in .env file}
# Server configuration
- HOST=${HOST:-0.0.0.0}
- PORT=${PORT:-8080}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- TRANSPORT=${TRANSPORT:-sse}
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8080/sse', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Usage Examples:
#
# 1. Using environment file (recommended):
# cp .env.example .env
# # Edit .env to set BACKEND_URL
# docker-compose up -d
#
# 2. Using inline environment variable:
# BACKEND_URL=https://api.simdoc.example.com docker-compose up -d
#
# 3. Custom port:
# MCP_PORT=9090 docker-compose up -d