diff --git a/environments/python/Dockerfile b/environments/python/Dockerfile index 483c9156..f4fac883 100644 --- a/environments/python/Dockerfile +++ b/environments/python/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.5 RUN apk update -RUN apk add --no-cache python3 python3-dev build-base +RUN apk add --no-cache python3 python3-dev build-base libev-dev RUN pip3 install --upgrade pip RUN rm -r /root/.cache diff --git a/environments/python/Dockerfile-2.7 b/environments/python/Dockerfile-2.7 index be9c736e..87e6455f 100644 --- a/environments/python/Dockerfile-2.7 +++ b/environments/python/Dockerfile-2.7 @@ -1,7 +1,7 @@ FROM alpine:3.5 RUN apk update -RUN apk add --no-cache python python-dev build-base py-pip +RUN apk add --no-cache python python-dev build-base py-pip libev-dev RUN pip install --upgrade pip RUN rm -r /root/.cache diff --git a/environments/python/requirements.txt b/environments/python/requirements.txt index 09d0579a..8f437f24 100644 --- a/environments/python/requirements.txt +++ b/environments/python/requirements.txt @@ -1,4 +1,5 @@ Flask===0.11.1 +bjoern httplib2 python-dateutil requests==2.7.0 diff --git a/environments/python/server.py b/environments/python/server.py index a961e7a9..cf4b216d 100644 --- a/environments/python/server.py +++ b/environments/python/server.py @@ -4,6 +4,7 @@ import logging import sys import imp import os +import bjoern from flask import Flask, request, abort, g @@ -99,4 +100,4 @@ def setup_logger(loglevel): # setup_logger(logging.DEBUG) app.logger.info("Starting server") -app.run(host='0.0.0.0', port=8888) +bjoern.run(app, '0.0.0.0', 8888, reuse_port=True)