-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (84 loc) · 3.06 KB
/
docker-compose.yml
File metadata and controls
88 lines (84 loc) · 3.06 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# =============================================================================
# Docker Compose for NTS MCP FileSystem Server
# =============================================================================
#
# IMPORTANT: Docker Mode and Roots
# --------------------------------
# You MUST set PROJECT_PATH and use NTS_DOCKER_ROOTS.
# The NTS_DOCKER_ROOTS environment variable overrides client-provided roots
# because client sends host paths that don't exist inside the container.
#
# Usage:
# Single project:
# PROJECT_PATH=/home/user/myproject docker compose run --rm nts
#
# Multiple projects (edit this file to add more volumes):
# docker compose run --rm nts-multi
#
# Using pre-built image:
# PROJECT_PATH=/home/user/myproject docker compose run --rm nts-prebuilt
#
# With debug logging:
# PROJECT_PATH=/home/user/myproject MCP_DEBUG=true docker compose run --rm nts
#
# Note: MCP servers use stdio, so we need 'docker compose run' (not 'up')
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Local build - single project
# ---------------------------------------------------------------------------
nts:
build:
context: .
dockerfile: Dockerfile
image: nts-mcp-fs:local
stdin_open: true # -i flag: required for MCP stdio
volumes:
- ${PROJECT_PATH:-.}:/mnt/project
environment:
- NTS_DOCKER_ROOTS=/mnt/project
- MCP_DEBUG=${MCP_DEBUG:-false}
- MCP_LOG_FILE=${MCP_LOG_FILE:-}
# ---------------------------------------------------------------------------
# Local build - multiple projects example
# Edit the volumes and NTS_DOCKER_ROOTS to match your setup
# ---------------------------------------------------------------------------
nts-multi:
build:
context: .
dockerfile: Dockerfile
image: nts-mcp-fs:local
stdin_open: true
volumes:
- ${PROJECT1_PATH:-./project1}:/mnt/p1
- ${PROJECT2_PATH:-./project2}:/mnt/p2
environment:
- NTS_DOCKER_ROOTS=/mnt/p1:/mnt/p2
- MCP_DEBUG=${MCP_DEBUG:-false}
# ---------------------------------------------------------------------------
# Pre-built image from GitHub Container Registry
# ---------------------------------------------------------------------------
nts-prebuilt:
image: ghcr.io/nefrols/nts-mcp-fs:latest
stdin_open: true
volumes:
- ${PROJECT_PATH:-.}:/mnt/project
environment:
- NTS_DOCKER_ROOTS=/mnt/project
- MCP_DEBUG=${MCP_DEBUG:-false}
# ---------------------------------------------------------------------------
# Debug mode (logs to file for troubleshooting)
# ---------------------------------------------------------------------------
nts-debug:
build:
context: .
dockerfile: Dockerfile
image: nts-mcp-fs:local
stdin_open: true
volumes:
- ${PROJECT_PATH:-.}:/mnt/project
- ./logs:/logs
environment:
- NTS_DOCKER_ROOTS=/mnt/project
- MCP_DEBUG=true
- MCP_LOG_FILE=/logs/nts-mcp.log