Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Allow PORT env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ulsa committed Mar 19, 2021
1 parent f8ec666 commit 5593524
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LABEL org.kennethreitz.vendor="Kenneth Reitz"

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV PORT=8080

RUN apt update -y && apt install python3-pip git -y && pip3 install --no-cache-dir pipenv

Expand All @@ -17,6 +18,6 @@ RUN /bin/bash -c "pip3 install --no-cache-dir -r <(pipenv lock -r)"
ADD . /httpbin
RUN pip3 install --no-cache-dir /httpbin

EXPOSE 80
EXPOSE $PORT

CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]
CMD exec gunicorn --bind :$PORT httpbin:app -k gevent

0 comments on commit 5593524

Please sign in to comment.