-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 1.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (42 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: '3.8'
services:
python-mcp-server:
build:
context: .
dockerfile: Dockerfile
container_name: ${MCP_SESSION_SERVER_CONTAINER_NAME}
ports:
- "${MCP_SESSION_SERVER_INTERNAL_PORT:-8000}:${MCP_SESSION_SERVER_INTERNAL_PORT}"
volumes:
# Mount a volume for potential database persistence
- python-mcp-db:/data/db
# You might need other volumes depending on your app's needs
# - ./some_local_dir:/app/some_app_dir
environment:
# Configure server host and port inside the container
- SERVER_HOST=0.0.0.0
- SERVER_PORT=${MCP_SESSION_SERVER_INTERNAL_PORT}
# Set transport mode
- MCP_TRANSPORT=${MCP_TRANSPORT:-http}
# Configure database path to use the volume
- DATABASE_URL=sqlite+aiosqlite:///data/db/mcp_server.db
# Indicate the environment
- ENVIRONMENT=docker
# Add any other environment variables your application needs
# - LOG_LEVEL=info
restart: unless-stopped
healthcheck:
# Use the correct health check endpoint from src/main.py
test: ["CMD", "curl", "-f", "http://localhost:${MCP_SESSION_SERVER_INTERNAL_PORT}/_fastapi_health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
python-mcp-db:
driver: local
# Define other volumes if needed
networks:
default:
external: true
name: crawl4ai-network