add Dockerfile

This commit is contained in:
Henning Jacobs
2016-12-13 09:28:58 +01:00
parent a2a7f0ee1f
commit 6e0dbe6529
2 changed files with 22 additions and 1 deletions

9
app.py
View File

@@ -5,6 +5,8 @@ gevent.monkey.patch_all()
import connexion
import flask
import logging
import os
import requests
@@ -36,4 +38,9 @@ def get_clusters():
app.add_api('swagger.yaml')
if __name__ == '__main__':
app.run(port=8080, debug=True) #, server='gevent')
logging.basicConfig(level=logging.INFO)
if os.getenv('DEBUG', False):
kwargs = {'debug': True}
else:
kwargs = {'server': 'gevent'}
app.run(port=8080, **kwargs)