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

use gunicorn server instead of django test server (as recommended by taiga) #35 #42 #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ ENV DEBIAN_FRONTEND noninteractive
# Version of Nginx to install
ENV NGINX_VERSION 1.9.7-1~jessie

RUN apt-key adv \
--keyserver hkp://pgp.mit.edu:80 \
--recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
RUN curl -O https://nginx.org/keys/nginx_signing.key && apt-key add ./nginx_signing.key

RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list

Expand Down Expand Up @@ -52,22 +50,31 @@ ENV LANG C

RUN pip install --no-cache-dir -r requirements.txt

RUN echo "LANG=en_US.UTF-8" > /etc/default/locale
RUN echo "LC_TYPE=en_US.UTF-8" > /etc/default/locale
RUN echo "LC_MESSAGES=POSIX" >> /etc/default/locale
RUN echo "LANGUAGE=en" >> /etc/default/locale



#RUN echo "LANG=en_US.UTF-8" >> /etc/default/locale
#RUN echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale
#RUN echo "LC_TYPE=en_US.UTF-8" >> /etc/default/locale
#RUN echo "LC_MESSAGES=POSIX" >> /etc/default/locale
#RUN echo "LANGUAGE=en" >> /etc/default/locale



ENV LANG en_US.UTF-8
ENV LC_TYPE en_US.UTF-8


RUN locale-gen en_US.UTF-8 && locale -a

ENV TAIGA_SSL False
ENV TAIGA_ENABLE_EMAIL False
ENV TAIGA_HOSTNAME localhost
ENV TAIGA_SECRET_KEY "!!!REPLACE-ME-j1598u1J^U*(y251u98u51u5981urf98u2o5uvoiiuzhlit3)!!!"

RUN python manage.py collectstatic --noinput

RUN locale -a


# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log
Expand All @@ -80,4 +87,4 @@ VOLUME /usr/src/taiga-back/media
COPY checkdb.py /checkdb.py
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
CMD ["gunicorn", "-w 3", "-t 60", "--pythonpath=.", "-b 127.0.0.1:8001", "taiga.wsgi"]
4 changes: 2 additions & 2 deletions conf/nginx/taiga.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8000/api;
proxy_pass http://127.0.0.1:8001/api;
proxy_redirect off;
proxy_connect_timeout 300;
proxy_send_timeout 300;
Expand All @@ -35,7 +35,7 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8000$request_uri;
proxy_pass http://127.0.0.1:8001$request_uri;
proxy_redirect off;
}

Expand Down
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ fi
# nginx -g "daemon off;"
service nginx start

# Start Taiga backend Django server
# Start gunicorn server
exec "$@"