From e41d238f2a8bbf7a162da891e7272b20154b0c2d Mon Sep 17 00:00:00 2001 From: Ashwin Naren Date: Mon, 6 Nov 2023 16:13:18 -0800 Subject: [PATCH] gunicorn support --- gunicorn.py | 7 ++++--- requirements.txt | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gunicorn.py b/gunicorn.py index 466e74b..0e3fe44 100644 --- a/gunicorn.py +++ b/gunicorn.py @@ -1,8 +1,9 @@ from website.app import create_app from website.config import BaseConfig +import os -def app(db, secret_key): - BaseConfig.SECRET_KEY = secret_key - BaseConfig.SQLALCHEMY_DATABASE_URI = db +def app(): + BaseConfig.SECRET_KEY = os.environ.get("SECRET_KEY") + BaseConfig.SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") return create_app() diff --git a/requirements.txt b/requirements.txt index 001cb6b..0ea84ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ flask +gunicorn requests click autotraders>=1.6.1