From 5516b6bc7617e9a1198b442f0b0cc9c66ac5e276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eckl=2C=20M=C3=A1t=C3=A9?= Date: Fri, 11 Mar 2022 12:00:48 +0100 Subject: [PATCH] Make gunicorn directly configurable by making default commands ENTRYPOINT Now it's possible to configure gunicorn parameters without duplicating the original ones in either the CLI command, a new Dockerfile or a docker-compose.yml. --- Dockerfile | 2 +- README.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 819006bb..1470fe6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ RUN pip3 install --no-cache-dir /httpbin EXPOSE 80 -CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"] +ENTRYPOINT ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"] diff --git a/README.md b/README.md index 8148d684..feab2ba3 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,12 @@ docker pull kennethreitz/httpbin docker run -p 80:80 kennethreitz/httpbin ``` +You can configure the server behaviour by providing gunicorn flags as docker +command. For example, to configure access logging to STDOUT, run the following: +```sh +docker run -p 80:80 kennethreitz/httpbin --access-logfile - +``` + See http://httpbin.org for more information. ## Officially Deployed at: