version: '3.8'
# MCP ABAP ADT Server with AuthBroker and destination-based authentication
#
# Architecture:
# - Uses AuthBroker for authentication management
# - Service keys stored in volume (./service-keys)
# - Sessions stored in local temporary directory (./sessions)
# - HTTP transport on port 3000
services:
mcp-abap-adt:
build:
context: ..
dockerfile: docker/Dockerfile
container_name: mcp-abap-adt-server
restart: unless-stopped
# HTTP transport for client connections
ports:
- "3000:3000"
# Environment configuration
environment:
- NODE_ENV=production
- MCP_HTTP_PORT=3000
- MCP_HTTP_HOST=0.0.0.0
# Destination name (service key filename without .json)
# Override with: docker-compose run -e MCP_DESTINATION=your-dest mcp-abap-adt
- MCP_DESTINATION=${MCP_DESTINATION:-default}
# Optional: Enable session storage for persistent sessions
# - MCP_ENABLE_SESSION_STORAGE=true
# Optional: Custom paths for AuthBroker
# - AUTH_BROKER_PATH=/app/service-keys
# Volumes for AuthBroker data
volumes:
# Service keys directory - put your {destination}.json files here
# Example: ./service-keys/trial.json, ./service-keys/dev.json
- ./service-keys:/app/service-keys:ro
# Sessions directory - AuthBroker stores session data here
# Contains .env files with tokens: {destination}.env
- ./sessions:/app/sessions
# Optional: Locks directory for object locking
# - ./locks:/app/.locks
# Optional: Cache directory
# - ./cache:/app/cache
# Resource limits
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
# Healthcheck
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"