-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (46 loc) · 1.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (46 loc) · 1.1 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
46
47
48
49
version: '3.8'
services:
linter-mcp:
build: .
container_name: linter-mcp-server
volumes:
# 挂载配置文件,允许自定义规范
- ./config.yaml:/app/config.yaml:ro
# 挂载源代码目录(开发模式)
- .:/app
environment:
- PYTHONPATH=/app
- PYTHONUNBUFFERED=1
# MCP服务器通过stdio通信,不需要端口映射
# 如果需要HTTP API,可以取消注释下面的端口映射
# ports:
# - "8000:8000"
stdin_open: true
tty: true
# 重启策略
restart: unless-stopped
# 健康检查
healthcheck:
test: ["CMD", "python", "-c", "import sys; sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# 开发模式服务(可选)
linter-mcp-dev:
build: .
container_name: linter-mcp-dev
volumes:
- .:/app
environment:
- PYTHONPATH=/app
- PYTHONUNBUFFERED=1
- DEBUG=1
stdin_open: true
tty: true
command: ["python", "-u", "mcp_stdio_server.py"]
profiles:
- dev
networks:
default:
name: linter-mcp-network