From 457123d96643bd312c75d386311a4b9efbcbcf2d Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com> Date: Sun, 28 Sep 2025 10:48:11 +0530 Subject: [PATCH] fix(tools): improve devcontainer experience (#62395) --- .devcontainer/devcontainer.json | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6be8840971c..4533b9f1567 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,6 +3,23 @@ "dockerComposeFile": "docker-compose.yml", "service": "devcontainer", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - // "features": {}, - "forwardPorts": [3000, 8000] + "forwardPorts": [3000, 8000], + "portsAttributes": { + "3000": { + "label": "API", + "onAutoForward": "silent" + }, + "8000": { + "label": "Client", + "onAutoForward": "notify" + } + }, + "otherPortsAttributes": { + "onAutoForward": "silent" + }, + "onCreateCommand": "[ ! -f .env ] && cp sample.env .env || true", + "updateContentCommand": "pnpm install && pnpm seed", + "postAttachCommand": { + "instructions": "bash -c 'echo \"\n\n\n Start a new terminal and run \\`pnpm run develop\\` when you are ready.\n\n\n\"'" + } }