From 3f1db856e16863fdd70c252483016ac2a8c9856a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 17 Aug 2021 15:09:02 +0200 Subject: [PATCH] Update systemd.service --- conf/systemd.service | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index b4a69ae..d94d6ac 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,8 +9,20 @@ Group=__APP__ WorkingDirectory=__FINALPATH__ Environment=PATH=__ENV_PATH__ Environment=NODE_ENV=production -ExecStart=__YNH_NPM__ start +ExecStart=__YNH_NPM__ __FINALPATH__/server.js + Restart=always +RestartSec=2 + +# Output to syslog +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=cryptpad + +# systemd sets the open file limit to 4000 unless you override it +# cryptpad stores its data with the filesystem, so you should increase this to match the value of `ulimit -n` +# or risk EMFILE errors. +LimitNOFILE=1000000 PrivateDevices=true ProtectControlGroups=true