Adding GUNICORN support
This commit is contained in:
parent
d94c512ae9
commit
016658f2a6
4 changed files with 32 additions and 2 deletions
|
@ -4,6 +4,7 @@ Flask==0.12.1
|
|||
Flask-Bootstrap==3.3.7.1
|
||||
Flask-Cache==0.13.1
|
||||
Flask-SQLAlchemy==2.2
|
||||
gunicorn==19.7.1
|
||||
itsdangerous==0.24
|
||||
Jinja2==2.9.6
|
||||
MarkupSafe==1.0
|
||||
|
|
3
setup.py
3
setup.py
|
@ -28,7 +28,8 @@ setup(
|
|||
'flask',
|
||||
'flask-bootstrap',
|
||||
'flask-sqlalchemy',
|
||||
'pymysql'
|
||||
'pymysql',
|
||||
"gunicorn"
|
||||
],
|
||||
author="Denis Nutiu",
|
||||
author_email="denis.nutiu@gmail.com",
|
||||
|
|
|
@ -51,4 +51,4 @@ except (IndexError, KeyError):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(app.config["APP_IP"], app.config["APP_PORT"])
|
||||
app.run(app.config["BIND_IP"], app.config["BIND_PORT"])
|
||||
|
|
28
src/gconfig.py
Normal file
28
src/gconfig.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
"""
|
||||
Author: Denis Nutiu <denis.nutiu@gmail.com>
|
||||
This file is part of scoreboard-benchmark.
|
||||
|
||||
scoreboard-benchmark is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
scoreboard-benchmark is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with scoreboard-benchmark . If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This the configuration file for the GUnicorn server.
|
||||
"""
|
||||
from src.config import ProductionConfig
|
||||
import multiprocessing
|
||||
|
||||
bind = "{ip}:{port}".format(ip=ProductionConfig.BIND_IP, port=ProductionConfig.BIND_PORT)
|
||||
workers = multiprocessing.cpu_count() * 2 + 1
|
||||
reload = False
|
||||
#daemon = True
|
||||
#user = "denis"
|
||||
#group = "www-data"
|
Loading…
Reference in a new issue