Added debugging support to services (#113)

This commit is contained in:
Miguel Serrano 2019-09-10 17:13:17 +02:00 committed by GitHub
parent 47eb3e4186
commit fad5639f55
14 changed files with 97 additions and 27 deletions

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/chat/app.js >> /var/log/sharelatex/chat.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - chat"
NODE_PARAMS="--inspect=0.0.0.0:30100"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/chat/app.js >> /var/log/sharelatex/chat.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/clsi/app.js >> /var/log/sharelatex/clsi.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - clsi"
NODE_PARAMS="--inspect=0.0.0.0:30130"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/clsi/app.js >> /var/log/sharelatex/clsi.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - contacts"
NODE_PARAMS="--inspect=0.0.0.0:30360"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/docstore/app.js >> /var/log/sharelatex/docstore.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - docstore"
NODE_PARAMS="--inspect=0.0.0.0:30160"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/docstore/app.js >> /var/log/sharelatex/docstore.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/document-updater/app.js >> /var/log/sharelatex/document-updater.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - document updater"
NODE_PARAMS="--inspect=0.0.0.0:30030"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/document-updater/app.js >> /var/log/sharelatex/document-updater.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/notifications/app.js >> /var/log/sharelatex/notifications.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - notifications"
NODE_PARAMS="--inspect=0.0.0.0:30420"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/notifications/app.js >> /var/log/sharelatex/notifications.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/spelling/app.js >> /var/log/sharelatex/spelling.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - spelling"
NODE_PARAMS="--inspect=0.0.0.0:30050"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/spelling/app.js >> /var/log/sharelatex/spelling.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/tags/app.js >> /var/log/sharelatex/tags.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - tags"
NODE_PARAMS="--inspect=0.0.0.0:30120"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/tags/app.js >> /var/log/sharelatex/tags.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/track-changes/app.js >> /var/log/sharelatex/track-changes.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - track-changes"
NODE_PARAMS="--inspect=0.0.0.0:30150"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/track-changes/app.js >> /var/log/sharelatex/track-changes.log 2>&1

View file

@ -1,3 +1,10 @@
#!/bin/bash
export SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
exec /sbin/setuser www-data /usr/bin/node /var/www/sharelatex/web/app.js >> /var/log/sharelatex/web.log 2>&1
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - web"
NODE_PARAMS="--inspect=0.0.0.0:40000"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/web/app.js >> /var/log/sharelatex/web.log 2>&1