Run in production mode by default
Use DEBUG environment variable to run debug mode
This commit is contained in:
parent
addd1495a3
commit
d61c08c7c7
2 changed files with 5 additions and 1 deletions
|
@ -53,6 +53,8 @@ You can configure the following via environment variables.
|
|||
`SECRET_KEY` this should be a unique key that's used to sign key. This should
|
||||
be kept secret. See the `Flask Documentation`_ for more information.
|
||||
|
||||
`DEBUG` to run Flask web werver in debug mode. See the `Flask Documentation`_ for more information.
|
||||
|
||||
.. _Flask Documentation: http://flask.pocoo.org/docs/quickstart/#sessions
|
||||
|
||||
`STATIC_URL` this should be the location of your static assets. You might not
|
||||
|
|
|
@ -10,6 +10,8 @@ from flask import abort, Flask, render_template, request
|
|||
|
||||
NO_SSL = os.environ.get('NO_SSL', False)
|
||||
app = Flask(__name__)
|
||||
if os.environ.get('DEBUG'):
|
||||
app.debug = True
|
||||
app.secret_key = os.environ.get('SECRET_KEY', 'Secret Key')
|
||||
app.config.update(
|
||||
dict(STATIC_URL=os.environ.get('STATIC_URL', 'static')))
|
||||
|
@ -108,7 +110,7 @@ def show_password(password_key):
|
|||
|
||||
@check_redis_alive
|
||||
def main():
|
||||
app.run(host='0.0.0.0', debug=True)
|
||||
app.run(host='0.0.0.0')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue