Skip to content

Commit e18a45f

Browse files
viveksynghalexellis
authored andcommitted
added wsgi gevent
removed http_server variable Signed-off-by: Vivek Singh <[email protected]>
1 parent 7580a6c commit e18a45f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

template/python27-flask/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ RUN apk --no-cache add curl \
55
&& echo "Pulling watchdog binary from Github." \
66
&& curl -sSLf https://github.com/openfaas-incubator/of-watchdog/releases/download/0.2.1/of-watchdog > /usr/bin/fwatchdog \
77
&& chmod +x /usr/bin/fwatchdog \
8-
&& apk del curl --no-cache
8+
&& apk del curl --no-cache \
9+
&& apk add --no-cache gcc \
10+
&& apk add --no-cache musl-dev
911

1012
WORKDIR /root/
1113

template/python27-flask/index.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from flask import Flask, request
55
from function import handler
6+
from gevent.pywsgi import WSGIServer
67

78
app = Flask(__name__)
89

@@ -11,5 +12,7 @@ def main_route():
1112
ret = handler.handle(request.get_data())
1213
return ret
1314

15+
app.debug = False
16+
1417
if __name__ == '__main__':
15-
app.run(host='0.0.0.0', port=5000, debug=False)
18+
WSGIServer(('0.0.0.0', 5000), app)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
flask
2-
2+
gevent

0 commit comments

Comments
 (0)