version: '3.8'
services:
openapi-mcp:
build: .
ports:
- "8080:8080"
environment:
- LOG_FORMAT=pretty
- LOG_LEVEL=debug
command:
- "--spec-url"
- "https://petstore.swagger.io/v3/openapi.json"
- "--upstream-url"
- "https://petstore.swagger.io/v3"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
# Example with local spec file
# openapi-mcp-local:
# build: .
# ports:
# - "8081:8080"
# volumes:
# - ./examples/my-api.yaml:/spec.yaml:ro
# command:
# - "--spec-file"
# - "/spec.yaml"
# - "--upstream-url"
# - "https://api.example.com"