# docker-compose.yml
version: '3.8'
services:
mcp-server:
# 'build: .' tells Docker Compose to build the image using the Dockerfile
# in the current directory.
build: .
container_name: mcp-stateless-server
# 'restart: unless-stopped' ensures the container will restart automatically
# if it crashes, but not if you manually stop it.
restart: unless-stopped
ports:
# Maps port 1071 on your host machine to port 1071 in the container.
# Format is HOST:CONTAINER
- '1071:1071'
environment:
# Pass environment variables to your application.
# Your code reads these to configure itself.
- PORT=1071
- LOG_LEVEL=info
- RATE_LIMIT_MAX=1000
# You can add your optional tool name here if you want
# - SAMPLE_TOOL_NAME=my-echo-tool
healthcheck:
test: ['CMD', 'wget', '-q', '--spider', 'http://localhost:1071/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 40s