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

General update #55

Closed
wants to merge 6 commits into from
Closed
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:8000", "taiga.wsgi"]
19 changes: 11 additions & 8 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@ if [ -z "$TAIGA_SKIP_DB_CHECK" ]; then
if [ $DB_CHECK_STATUS -eq 1 ]; then
echo "Failed to connect to database server or database does not exist."
exit 1
elif [ $DB_CHECK_STATUS -eq 2 ]; then
fi

# Database migration check should be done in all startup in case of backend upgrade
echo "Check for database migration"
python manage.py migrate --noinput

if [ $DB_CHECK_STATUS -eq 2 ]; then
echo "Configuring initial database"
python manage.py migrate --noinput
python manage.py loaddata initial_user
python manage.py loaddata initial_project_templates
python manage.py loaddata initial_role
python manage.py compilemessages
fi
fi

# Look for static folder, if it does not exist, then generate it
if [ ! -d "/usr/src/taiga-back/static" ]; then
python manage.py collectstatic --noinput
fi
# In case of frontend upgrade, locales and statics should be regenerated
python manage.py compilemessages
python manage.py collectstatic --noinput

# Automatically replace "TAIGA_HOSTNAME" with the environment variable
sed -i "s/TAIGA_HOSTNAME/$TAIGA_HOSTNAME/g" /taiga/conf.json
Expand Down Expand Up @@ -59,5 +62,5 @@ fi
# nginx -g "daemon off;"
service nginx start

# Start Taiga backend Django server
# Start gunicorn server
exec "$@"
2 changes: 1 addition & 1 deletion taiga-back
Submodule taiga-back updated 117 files
2 changes: 1 addition & 1 deletion taiga-front-dist
Submodule taiga-front-dist updated 3476 files