Created
June 30, 2023 03:30
-
-
Save lg/78fe20be0249cf2890b051b94d88ba90 to your computer and use it in GitHub Desktop.
vscode launch.json to start a server in docker and debug it (originally from awardwiz)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"recommendations": [ | |
"spadin.memento-inputs" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Run scraper with Docker", // Edit the parameters in tasks.json | |
"request": "attach", | |
"type": "node", | |
"skipFiles": ["<node_internals>/**", "**/node_modules/**"], | |
"preLaunchTask": "start scrapers docker", | |
"postDebugTask": "stop scrapers docker", | |
"address": "127.0.0.1", | |
"port": 9229, | |
"localRoot": "${workspaceFolder}", | |
"remoteRoot": "/usr/src/awardwiz", | |
"continueOnAttach": true, | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "start scrapers docker", | |
"type": "process", | |
"command": "just", | |
"args": ["run-scraper-brk", "united", "SFO", "LAX", "2023-12-25"], | |
"dependsOn": "tsc: build - tsconfig.json", | |
"isBackground": true, | |
"problemMatcher": { | |
"base": "$tsc", | |
"background": { | |
"activeOnStart": true, | |
"beginsPattern": "Debugger listening on .*", | |
"endsPattern": "Debugger listening on .*" | |
}, | |
}, | |
"runOptions": { | |
"instanceLimit": 1 | |
}, | |
"presentation": { | |
"showReuseMessage": false, | |
} | |
}, | |
{ | |
"label": "stop scrapers docker", | |
"type": "process", | |
"command": "bash", | |
"args": ["-c", "CONTAINER=$(docker ps | grep awardwiz | awk '{ print $1 }'); docker stop -t 0 $CONTAINER"], | |
"presentation": { | |
"close": true, | |
"reveal": "never" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment