forked from MarseyWorld/MarseyWorld
add new env var WORKER_COUNT
parent
bd3a672c2d
commit
730254d364
|
@ -18,3 +18,4 @@ export DONATE_LINK='https://blahblahblah'
|
|||
export CF_KEY='blahblahblah'
|
||||
export CF_ZONE='blahblahblah'
|
||||
export DEBIAN_FRONTEND='noninteractive'
|
||||
export WORKER_COUNT="2"
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os import environ
|
||||
|
||||
STARS = '\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n'
|
||||
|
||||
bind = '0.0.0.0:5000'
|
||||
|
||||
worker_class = 'gevent'
|
||||
worker_count = int(environ.get("WORKER_COUNT").strip())
|
||||
|
||||
max_requests = 5000
|
||||
max_requests_jitter = 10000
|
||||
|
|
|
@ -2,4 +2,5 @@ cd /staging
|
|||
git pull
|
||||
. /e
|
||||
export SITE="staging.rdrama.net"
|
||||
gunicorn files.__main__:app -w 1 -b 0.0.0.0:5002 -t 0
|
||||
export WORKER_COUNT="1"
|
||||
gunicorn files.__main__:app -b 0.0.0.0:5002 -t 0
|
||||
|
|
|
@ -3,4 +3,4 @@ export DATABASE_URL='postgresql://postgres@postgres:5432'
|
|||
export REDIS_URL='redis://redis:6379'
|
||||
export PROXY_URL='http://opera-proxy:18080'
|
||||
/etc/init.d/nginx start
|
||||
gunicorn files.__main__:app -w 2
|
||||
gunicorn files.__main__:app
|
||||
|
|
|
@ -12,7 +12,7 @@ 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'
|
||||
ExecStart = /bin/bash -c 'set -a && source /e && SITE=marsey.world && WORKER_COUNT=1 && /usr/bin/env gunicorn files.__main__:app -k gevent --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
|
||||
|
|
|
@ -12,7 +12,7 @@ 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 32 --pid /run/rdrama/rdrama.pid'
|
||||
ExecStart = /bin/bash -c 'set -a && source /e && /usr/bin/env gunicorn files.__main__:app --pid /run/rdrama/rdrama.pid'
|
||||
ExecReload = /bin/kill -s HUP $MAINPID
|
||||
ExecStop = /bin/kill -s TERM $MAINPID
|
||||
ExecStopPost = /bin/rm -rf /run/rdrama
|
||||
|
|
Loading…
Reference in New Issue