launch settings

This commit is contained in:
Dobromir Popov
2023-05-15 08:13:14 +00:00
parent 77f3ee093c
commit ff168b1c18
3 changed files with 77 additions and 4 deletions

11
.vscode/keybindings.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"key": "ctrl+alt+1",
"command": "workbench.action.tasks.runTask",
"args": "Docker Compose Start"
},
{
"key": "ctrl+alt+2",
"command": "workbench.action.tasks.runTask",
"args": "Docker Compose Stop"
}

43
.vscode/launch.json vendored
View File

@@ -4,14 +4,49 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"command": "npm run start",
"name": "Run npm start",
"request": "launch",
"type": "node-terminal"
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/index.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dht.js"
}
"type": "node"
},
{
"name": "Attach to Remote Docker",
"type": "node",
"request": "attach",
"remoteRoot": "/app",
"localRoot": "${workspaceFolder}",
"protocol": "inspector",
"address": "localhost",
"port": 9229,
"restart": true,
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
},
{
"type": "node",
"request": "attach",
"name": "Docker: Attach to Node",
"port": 9229,
"address": "localhost",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/usr/src/app", // Path where your app is located in Docker
"protocol": "inspector"
}
]
}

27
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,27 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Docker Compose Start",
"type": "shell",
"command": "docker-compose build && docker-compose up -d",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "Docker Compose Stop",
"type": "shell",
"command": "docker-compose down",
"problemMatcher": []
},
{
"label": "Docker Compose Deploy",
"type": "shell",
"command": "docker-compose build && docker stack deploy --compose-file docker-compose.yml iot-garden",
"problemMatcher": []
}
]
}