From 3355fde7360230d127496bf8afb79a02ca1a8246 Mon Sep 17 00:00:00 2001 From: aniongithub Date: Wed, 13 May 2026 20:09:05 -0700 Subject: [PATCH 1/2] fix: map devcontainer port 4242 to host 51888 Let mind-map use its default port (4242) inside the container. Docker maps it to 51888 on the host, avoiding conflict with the production mind-map service on host port 4242. Set onAutoForward to ignore so VS Code doesn't also forward 4242. --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a02b1f5..cfcc017 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -37,13 +37,13 @@ } }, "containerEnv": { - "MIND_MAP_PORT": "51888" // This is different from default to prevent clashes with existing mind-map on host + "MIND_MAP_PORT": "4242" }, - "forwardPorts": [51888], + "appPort": ["51888:4242"], "portsAttributes": { - "51888": { + "4242": { "label": "mind-map Server (devcontainer)", - "onAutoForward": "notify" + "onAutoForward": "ignore" } } } From 6993ee8413f67438d33e04ca3c4b6f250eb76f6c Mon Sep 17 00:00:00 2001 From: aniongithub Date: Wed, 13 May 2026 20:10:46 -0700 Subject: [PATCH 2/2] fix: remove MIND_MAP_PORT env var, use default port everywhere mind-map uses its default port (4242) inside the container. Docker maps it to host 51888. No env var indirection needed. Cleaned up: devcontainer.json, launch.json, tasks.json --- .devcontainer/devcontainer.json | 3 --- .vscode/launch.json | 6 +++--- .vscode/tasks.json | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cfcc017..f09c0e6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -36,9 +36,6 @@ } } }, - "containerEnv": { - "MIND_MAP_PORT": "4242" - }, "appPort": ["51888:4242"], "portsAttributes": { "4242": { diff --git a/.vscode/launch.json b/.vscode/launch.json index 2a3727c..aeeacb8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -17,7 +17,7 @@ "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/mind-map", - "args": ["serve", "--addr", ":${env:MIND_MAP_PORT}", "--dir", "${workspaceFolder}/testdata", "--webui", "${workspaceFolder}/webui/dist"], + "args": ["serve", "--dir", "${workspaceFolder}/testdata", "--webui", "${workspaceFolder}/webui/dist"], "preLaunchTask": "build-webui" }, { @@ -26,7 +26,7 @@ "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/mind-map", - "args": ["serve", "--addr", ":${env:MIND_MAP_PORT}", "--dir", "${workspaceFolder}/testdata", "--webui", "${workspaceFolder}/webui/dist"], + "args": ["serve", "--dir", "${workspaceFolder}/testdata", "--webui", "${workspaceFolder}/webui/dist"], }, { "name": "mind-map (stdio)", @@ -42,7 +42,7 @@ "request": "launch", "browserLaunchLocation": "ui", "runtimeExecutable": "stable", - "url": "http://localhost:${env:MIND_MAP_PORT}", + "url": "http://localhost:4242", "webRoot": "${workspaceFolder}/webui", "preLaunchTask": "waitForServer", "userDataDir": "${workspaceFolder}/.vscode/cache", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9067b8b..46f4a73 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -47,7 +47,7 @@ { "label": "waitForServer", "type": "shell", - "command": "while ! nc -z localhost ${MIND_MAP_PORT}; do sleep 1; done", + "command": "while ! nc -z localhost 4242; do sleep 1; done", "group": "none", "dependsOn": ["build-webui"], "problemMatcher": {