Skip to content

Commit

Permalink
Setup http server with gunicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaister committed Mar 20, 2020
1 parent 6e9e667 commit 7d0bfe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ certifi==2019.11.28
chardet==3.0.4
Click==7.0
cymem==2.0.3
en-core-web-sm==2.2.5
Flask==1.1.1
Flask-Compress==1.4.0
gunicorn==20.0.4
idna==2.9
importlib-metadata==1.5.0
itsdangerous==1.1.0
Expand Down
8 changes: 4 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh

git pull
pkill -SIGTERM flask
pkill -SIGTERM gunicorn
source magicsearch/bin/activate
export FLASK_APP=app
export FLASK_ENV=production
nohup flask run -h 127.0.0.1 -p 5000 --with-threads --reload >> ms.log &
#export FLASK_APP=app
#export FLASK_ENV=production
nohup gunicorn -b "127.0.0.1:5000" --timeout 60 --workers 2 app:app >> ms.log &

sleep 5
curl 127.0.0.1:5000/runrules

0 comments on commit 7d0bfe5

Please sign in to comment.