diff --git a/Procfile b/Procfile index b15858e..5cd4f41 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -web: gunicorn -w 4 manage:app --log-file=- +web: gunicorn -w 4 heroku-run:app --log-file=- init: python manage.py initdb diff --git a/config.py b/config.py index 0e41ae1..132a773 100644 --- a/config.py +++ b/config.py @@ -23,8 +23,16 @@ class DevelopmentConfig(Config): 'postgres://matthew@localhost/akindices' +class HerokuConfig(Config): + DEBUG = False + TITLE = 'AKIndices' + SECRET_KEY = os.environ.get('SECRET_KEY') or 'top secret' + SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') + + config = { 'development': DevelopmentConfig, + 'heroku': HerokuConfig, 'default': DevelopmentConfig } diff --git a/heroku-run.py b/heroku-run.py new file mode 100644 index 0000000..bb5b11b --- /dev/null +++ b/heroku-run.py @@ -0,0 +1,6 @@ +from app import create_app + +app = create_app('heroku') + +if __name__ == "__main__": + app.run()