overleaf/package/upstart/sharelatex-docstore.conf

28 lines
813 B
Text
Raw Normal View History

2014-08-18 05:46:42 -04:00
description "sharelatex-web"
author "ShareLaTeX <team@sharelatex.com>"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on shutdown
respawn
limit nofile 8192 8192
pre-start script
2014-08-18 05:46:42 -04:00
mkdir -p /var/log/sharelatex
end script
script
2014-08-18 05:46:42 -04:00
SERVICE=docstore
USER=sharelatex
GROUP=sharelatex
# You may need to replace this with an absolute
# path to Node.js if it's not in your system PATH.
NODE=node
SHARELATEX_CONFIG=/etc/sharelatex/settings.coffee
2014-08-19 07:05:22 -04:00
LATEX_PATH=/usr/local/texlive/2014/bin/x86_64-linux
2014-08-18 05:46:42 -04:00
echo $$ > /var/run/sharelatex-$SERVICE.pid
cd /var/www/sharelatex/$SERVICE
2014-08-19 07:05:22 -04:00
exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1
2014-08-18 05:46:42 -04:00
end script