Skip to content

Commit

Permalink
Update Dockerfile to use gunicorn for python3 to resolve encoding errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ullebe1 committed Dec 2, 2017
1 parent 0833712 commit ad267d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ FROM ubuntu:latest
MAINTAINER Ulrik Djurtoft "ullebe1@gmail.com"

RUN apt-get update -y && \
apt-get install -y python-pip python-dev python-virtualenv gunicorn
apt-get install -y python3-pip python3-dev python3-virtualenv
RUN pip3 install gunicorn

# We copy just the requirements.txt first to leverage Docker cache
#COPY ./requirements.txt /app/requirements.txt
Expand All @@ -25,10 +26,10 @@ COPY gunicorn_config.py /deploy/gunicorn_config.py
COPY dagensdatalog.py /deploy/app/dagensdatalog.py
COPY templates /deploy/app/templates
COPY ./requirements.txt /deploy/app/requirements.txt
RUN pip install -r /deploy/app/requirements.txt
RUN pip3 install -r /deploy/app/requirements.txt
WORKDIR /deploy/app

EXPOSE 80

# Start gunicorn
CMD ["/usr/bin/gunicorn", "--config", "/deploy/gunicorn_config.py", "dagensdatalog:app"]
CMD ["gunicorn", "--config", "/deploy/gunicorn_config.py", "dagensdatalog:app"]

0 comments on commit ad267d0

Please sign in to comment.