From 46d76d1a52b256412843a869613102e6cd2c91ef Mon Sep 17 00:00:00 2001 From: lza_menace Date: Mon, 2 Oct 2023 10:59:26 -0700 Subject: [PATCH] add onion script and update mgmt script --- manage.sh | 1 + onion.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 onion.sh diff --git a/manage.sh b/manage.sh index 6ff3f24..b20e1a7 100755 --- a/manage.sh +++ b/manage.sh @@ -22,6 +22,7 @@ then --daemon \ --log-file $BASE/gunicorn.log \ --pid $BASE/gunicorn.pid \ + --workers 3 \ --reload sleep 2 echo "Started gunicorn on 127.0.0.1:4000 with pid $(cat $BASE/gunicorn.pid)" diff --git a/onion.sh b/onion.sh new file mode 100644 index 0000000..431b23f --- /dev/null +++ b/onion.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +source .venv/bin/activate +export FLASK_APP=xmrnodes/app.py +export FLASK_SECRETS=config.py +export FLASK_DEBUG=0 +export FLASK_ENV=production + +# override +source .env +export SERVER_NAME=livk2fpdv4xjnjrbxfz2tw3ptogqacn2dwfzxbxr3srinryxrcewemid.onion +export BASE=./data/gunicorn +mkdir -p $BASE +gunicorn \ + --bind 127.0.0.1:4001 "xmrnodes.app:app" \ + --daemon \ + --log-file $BASE/onion-gunicorn.log \ + --pid $BASE/onion-gunicorn.pid \ + --reload \ No newline at end of file