diff --git a/services/opera-proxy.service b/services/opera-proxy.service new file mode 100644 index 0000000000..ead315595f --- /dev/null +++ b/services/opera-proxy.service @@ -0,0 +1,14 @@ +[Unit] +Description = Opera Proxy +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 30s +User = rdrama +Group = rdrama +ExecStart = /snap/bin/opera-proxy + +[Install] +WantedBy = multi-user.target + diff --git a/services/rdrama-chat.service b/services/rdrama-chat.service new file mode 100644 index 0000000000..f63bdf051b --- /dev/null +++ b/services/rdrama-chat.service @@ -0,0 +1,22 @@ +[Unit] +Description = rDrama Chat +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 10s +PermissionsStartOnly = true +PIDFile = /run/rdrama-chat/rdrama-chat.pid +User = rdrama +Group = rdrama +WorkingDirectory = /d +ExecStartPre = /bin/mkdir /run/rdrama-chat +ExecStartPre = /bin/chown -R rdrama:rdrama /run/rdrama-chat +ExecStart = /bin/bash -c 'set -a && source /e && /usr/bin/env gunicorn files.__main__:app load_chat -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b 0.0.0.0:5001 --max-requests 30000 --max-requests-jitter 30000 --pid /run/rdrama-chat/rdrama-chat.pid' +ExecReload = /bin/kill -s HUP $MAINPID +ExecStop = /bin/kill -s TERM $MAINPID +ExecStopPost = /bin/rm -rf /run/rdrama-chat +PrivateTmp = true + +[Install] +WantedBy = multi-user.target diff --git a/services/rdrama-marseyworld.service b/services/rdrama-marseyworld.service new file mode 100644 index 0000000000..0514add855 --- /dev/null +++ b/services/rdrama-marseyworld.service @@ -0,0 +1,22 @@ +[Unit] +Description = rDrama marsey.world +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 5s +PermissionsStartOnly = true +PIDFile = /run/rdrama-marseyworld/rdrama-marseyworld.pid +User = rdrama +Group = rdrama +WorkingDirectory = /d +ExecStartPre = /bin/mkdir /run/rdrama-marseyworld +ExecStartPre = /bin/chown -R rdrama:rdrama /run/rdrama-marseyworld +ExecStart = /bin/bash -c 'set -a && source /e && SITE=marsey.world /usr/bin/env gunicorn files.__main__:app -k gevent -w 1 --reload -b 0.0.0.0:5010 --max-requests 30000 --max-requests-jitter 30000 --pid /run/rdrama-marseyworld/rdrama-marseyworld.pid' +ExecReload = /bin/kill -s HUP $MAINPID +ExecStop = /bin/kill -s TERM $MAINPID +ExecStopPost = /bin/rm -rf /run/rdrama-marseyworld +PrivateTmp = true + +[Install] +WantedBy = multi-user.target diff --git a/services/rdrama.service b/services/rdrama.service new file mode 100644 index 0000000000..672f1965da --- /dev/null +++ b/services/rdrama.service @@ -0,0 +1,22 @@ +[Unit] +Description = rDrama +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 10s +PermissionsStartOnly = true +PIDFile = /run/rdrama/rdrama.pid +User = rdrama +Group = rdrama +WorkingDirectory = /d +ExecStartPre = /bin/mkdir /run/rdrama +ExecStartPre = /bin/chown -R rdrama:rdrama /run/rdrama +ExecStart = /bin/bash -c 'set -a && source /e && /usr/bin/env gunicorn files.__main__:app -w 16 --pid /run/rdrama/rdrama.pid' +ExecReload = /bin/kill -s HUP $MAINPID +ExecStop = /bin/kill -s TERM $MAINPID +ExecStopPost = /bin/rm -rf /run/rdrama +PrivateTmp = true + +[Install] +WantedBy = multi-user.target