Set GUNICORN_WORKERS by environment variable.

This commit is contained in:
Cory Benfield
2015-02-22 09:38:00 +00:00
parent 9582a68903
commit bf63216aa1
+3 -1
View File
@@ -1,9 +1,11 @@
FROM ubuntu:trusty
ENV GUNICORN_WORKERS=4
ADD . /httpbin
RUN apt-get update -y && apt-get -y install python-pip && pip install gunicorn && pip install /httpbin
EXPOSE 8080
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8080", "httpbin:app"]
CMD gunicorn -w "$GUNICORN_WORKERS" -b 0.0.0.0:8080 httpbin:app