
Major updates to Docker deployment infrastructure: - Switch default port to 11235 for all services - Add MCP (Model Context Protocol) support with WebSocket/SSE endpoints - Simplify docker-compose.yml with auto-platform detection - Update documentation with new features and examples - Consolidate configuration and improve resource management BREAKING CHANGE: Default port changed from 8020 to 11235. Update your configurations and deployment scripts accordingly.
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
# Shared configuration for all environments
|
|
x-base-config: &base-config
|
|
ports:
|
|
- "11235:11235" # Gunicorn port
|
|
env_file:
|
|
- .llm.env # API keys (create from .llm.env.example)
|
|
environment:
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY:-}
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
|
- GROQ_API_KEY=${GROQ_API_KEY:-}
|
|
- TOGETHER_API_KEY=${TOGETHER_API_KEY:-}
|
|
- MISTRAL_API_KEY=${MISTRAL_API_KEY:-}
|
|
- GEMINI_API_TOKEN=${GEMINI_API_TOKEN:-}
|
|
volumes:
|
|
- /dev/shm:/dev/shm # Chromium performance
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 4G
|
|
reservations:
|
|
memory: 1G
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:11235/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
user: "appuser"
|
|
|
|
services:
|
|
crawl4ai:
|
|
# 1. Default: Pull multi-platform test image from Docker Hub
|
|
# 2. Override with local image via: IMAGE=local-test docker compose up
|
|
image: ${IMAGE:-unclecode/crawl4ai:${TAG:-latest}}
|
|
|
|
# Local build config (used with --build)
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
INSTALL_TYPE: ${INSTALL_TYPE:-default}
|
|
ENABLE_GPU: ${ENABLE_GPU:-false}
|
|
|
|
# Inherit shared config
|
|
<<: *base-config |