From 70a906f929791b1713bca720f9dac0d03f673c79 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 17 Jul 2022 19:22:43 +0200 Subject: [PATCH] add startup script (its dir is /s on our servers) --- startup.sh | 5 +++++ ubuntu_setup.sh | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 startup.sh diff --git a/startup.sh b/startup.sh new file mode 100644 index 000000000..c35ac3c4a --- /dev/null +++ b/startup.sh @@ -0,0 +1,5 @@ +cd /rDrama +git pull +. /env +gunicorn files.__main__:app load_chat -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 --reload -b 0.0.0.0:5001 --max-requests 30000 --max-requests-jitter 30000 -D +gunicorn files.__main__:app -k gevent -w 3 --reload -b 0.0.0.0:5000 --max-requests 30000 --max-requests-jitter 10000 \ No newline at end of file diff --git a/ubuntu_setup.sh b/ubuntu_setup.sh index 849b87bca..f9c6f5eae 100644 --- a/ubuntu_setup.sh +++ b/ubuntu_setup.sh @@ -8,6 +8,8 @@ cp ./env /env sed -i 's/^/export /g;s/=/="/g;s/$/"/g' /env . /env +cp ./startup.sh /s + apt -y update apt -y upgrade apt -y install git redis-server python3-pip libenchant1c2a ffmpeg tmux nginx snapd ufw gpg-agent