Split into docker containers
This commit is contained in:
17
patches/back/wsgi.py
Normal file
17
patches/back/wsgi.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Give a unique entry point for gunicorn
|
||||
"""
|
||||
|
||||
from gncitizen.utils.env import load_config
|
||||
from server import get_app
|
||||
|
||||
# get the app config file
|
||||
config = load_config()
|
||||
|
||||
# give the app context from server.py in a app object
|
||||
app = get_app(config)
|
||||
port = app.config["API_PORT"] if app.config.get("API_PORT", False) else 5002
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.debug = True
|
||||
app.run(host="0.0.0.0", port=port)
|
||||
Reference in New Issue
Block a user