Adds debug option to runssl function

This commit is contained in:
Matt Prahl
2016-08-12 09:23:01 -04:00
committed by Nils Philippsen
parent 68bc469bfa
commit 0bef0e0edc
2 changed files with 4 additions and 9 deletions

2
Vagrantfile vendored
View File

@@ -15,5 +15,5 @@ Vagrant.configure("2") do |config|
config.vm.synced_folder "./", "/opt/fm-orchestrator/src"
config.vm.network "forwarded_port", guest: 5000, host: 5000
config.vm.provision "shell", inline: $script
config.vm.provision :shell, inline: "cd /opt/fm-orchestrator/src && python manage.py runssl &", run: "always"
config.vm.provision :shell, inline: "cd /opt/fm-orchestrator/src && python manage.py runssl --debug &", run: "always"
end

View File

@@ -128,22 +128,17 @@ def upgradedb():
@manager.command
def runssl(host=None, port=None):
def runssl(host=conf.host, port=conf.port, debug=False):
""" Runs the Flask app with the HTTPS settings configured in config.py
"""
if not host:
host = conf.host
if not port:
port = conf.port
logging.info('Starting Rida')
ssl_ctx = _establish_ssl_context()
app.run(
host=host,
port=port,
request_handler=rida.auth.ClientCertRequestHandler,
ssl_context=ssl_ctx
ssl_context=ssl_ctx,
debug=debug
)
if __name__ == "__main__":