Skip to content

Commit

Permalink
Make gunicorn directly configurable by making default commands ENTRYP…
Browse files Browse the repository at this point in the history
…OINT

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.
  • Loading branch information
Eckl, Máté committed Mar 11, 2022
1 parent f8ec666 commit e601336
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e601336

Please sign in to comment.