Update devcontainer.json

Here's an updated version of the Docker-related development configuration with refinements for clarity and best practices
This commit is contained in:
Yuva 2024-12-25 10:54:29 +05:30 committed by GitHub
parent 8770905186
commit 6bc3da89bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,21 +3,26 @@
"dockerComposeFile": "compose.yaml", "dockerComposeFile": "compose.yaml",
"service": "app", "service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": { "features": {
"ghcr.io/devcontainers/features/sshd:1": {} "ghcr.io/devcontainers/features/sshd:1": {}
}, },
"forwardPorts": [3000, 4000], "forwardPorts": [3000, 3035, 4000],
"portsAttributes": { "portsAttributes": {
"3000": { "3000": {
"label": "web", "label": "Web Application",
"onAutoForward": "notify",
"requireLocalPort": true
},
"3035": {
"label": "Webpack Dev Server",
"onAutoForward": "notify", "onAutoForward": "notify",
"requireLocalPort": true "requireLocalPort": true
}, },
"4000": { "4000": {
"label": "stream", "label": "Streaming API",
"onAutoForward": "silent", "onAutoForward": "silent",
"requireLocalPort": true "requireLocalPort": true
} }
@ -30,13 +35,22 @@
}, },
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", "onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": "bin/setup", "postCreateCommand": "bin/setup && yarn install",
"waitFor": "postCreateCommand", "waitFor": "postCreateCommand",
"customizations": { "customizations": {
"vscode": { "vscode": {
"settings": {}, "settings": {
"extensions": ["EditorConfig.EditorConfig", "webben.browserslist"] "editor.formatOnSave": true,
"files.eol": "\n"
},
"extensions": [
"EditorConfig.EditorConfig",
"webben.browserslist",
"rebornix.ruby",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
} }
} }
} }