debug: add clinic.js for debugging
This commit is contained in:
parent
fcf30fbc00
commit
acdde9b3d7
6 changed files with 9583 additions and 269 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
.clinic
|
||||||
|
|
||||||
# Runtime data
|
# Runtime data
|
||||||
pids
|
pids
|
||||||
|
|
9824
backend/package-lock.json
generated
9824
backend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -8,10 +8,14 @@
|
||||||
"watch-yaml-parse-test": "cross-env NODE_ENV=development tsc-watch --onSuccess \"node dist/backend/src/yamlParseTest.js\"",
|
"watch-yaml-parse-test": "cross-env NODE_ENV=development tsc-watch --onSuccess \"node dist/backend/src/yamlParseTest.js\"",
|
||||||
"build": "rimraf dist && tsc",
|
"build": "rimraf dist && tsc",
|
||||||
"start-bot-dev": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js",
|
"start-bot-dev": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js",
|
||||||
|
"start-bot-dev-debug": "NODE_ENV=development clinic heapprofiler --collect-only -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/backend/src/index.js",
|
||||||
"start-bot-prod": "cross-env NODE_ENV=production node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/index.js",
|
"start-bot-prod": "cross-env NODE_ENV=production node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/index.js",
|
||||||
|
"start-bot-prod-debug": "NODE_ENV=production clinic heapprofiler --collect-only -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/index.js",
|
||||||
"watch-bot": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-bot-dev\"",
|
"watch-bot": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-bot-dev\"",
|
||||||
"start-api-dev": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js",
|
"start-api-dev": "cross-env NODE_ENV=development node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js",
|
||||||
|
"start-api-dev-debug": "NODE_ENV=development clinic heapprofiler --collect-only -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/backend/src/api/index.js",
|
||||||
"start-api-prod": "cross-env NODE_ENV=production node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/api/index.js",
|
"start-api-prod": "cross-env NODE_ENV=production node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/api/index.js",
|
||||||
|
"start-api-prod-debug": "NODE_ENV=production clinic heapprofiler --collect-only -- node -r ./register-tsconfig-paths.js --unhandled-rejections=strict --enable-source-maps --stack-trace-limit=30 dist/backend/src/api/index.js",
|
||||||
"watch-api": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-api-dev\"",
|
"watch-api": "cross-env NODE_ENV=development tsc-watch --onSuccess \"npm run start-api-dev\"",
|
||||||
"typeorm": "node -r ./register-tsconfig-paths.js ./node_modules/typeorm/cli.js",
|
"typeorm": "node -r ./register-tsconfig-paths.js ./node_modules/typeorm/cli.js",
|
||||||
"migrate-prod": "cross-env NODE_ENV=production npm run typeorm -- migration:run",
|
"migrate-prod": "cross-env NODE_ENV=production npm run typeorm -- migration:run",
|
||||||
|
@ -25,6 +29,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@silvia-odwyer/photon-node": "^0.3.1",
|
"@silvia-odwyer/photon-node": "^0.3.1",
|
||||||
"bufferutil": "^4.0.3",
|
"bufferutil": "^4.0.3",
|
||||||
|
"clinic": "^12.1.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
"deep-diff": "^1.0.2",
|
"deep-diff": "^1.0.2",
|
||||||
|
|
|
@ -55,6 +55,8 @@ services:
|
||||||
- prepare_backend
|
- prepare_backend
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/zeppelin
|
- ./:/zeppelin
|
||||||
|
environment:
|
||||||
|
DEBUG: ${DEBUG-}
|
||||||
command: ["/bin/bash", "/zeppelin/docker/production/start-api.sh"]
|
command: ["/bin/bash", "/zeppelin/docker/production/start-api.sh"]
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
|
@ -68,6 +70,8 @@ services:
|
||||||
- prepare_backend
|
- prepare_backend
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/zeppelin
|
- ./:/zeppelin
|
||||||
|
environment:
|
||||||
|
DEBUG: ${DEBUG-}
|
||||||
command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]
|
command: ["/bin/bash", "/zeppelin/docker/production/start-bot.sh"]
|
||||||
|
|
||||||
build_dashboard:
|
build_dashboard:
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
echo "Waiting for prepare_backend to finish before starting the API..."
|
echo "Waiting for prepare_backend to finish before starting the API..."
|
||||||
while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
|
while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
|
||||||
|
|
||||||
echo "Starting the API"
|
|
||||||
cd /zeppelin/backend
|
cd /zeppelin/backend
|
||||||
exec npm run start-api-prod
|
if [ -n "$DEBUG" ]; then
|
||||||
|
echo "Starting API in debug mode"
|
||||||
|
exec npm run start-api-prod-debug
|
||||||
|
else
|
||||||
|
echo "Starting API"
|
||||||
|
exec npm run start-api-prod
|
||||||
|
fi
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
echo "Waiting for prepare_backend to finish before starting the bot..."
|
echo "Waiting for prepare_backend to finish before starting the bot..."
|
||||||
while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
|
while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
|
||||||
|
|
||||||
echo "Starting the bot"
|
|
||||||
cd /zeppelin/backend
|
cd /zeppelin/backend
|
||||||
exec npm run start-bot-prod
|
if [ -n "$DEBUG" ]; then
|
||||||
|
echo "Starting bot in debug mode"
|
||||||
|
exec npm run start-bot-prod-debug
|
||||||
|
else
|
||||||
|
echo "Starting bot"
|
||||||
|
exec npm run start-bot-prod
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue