pull/9/head
Andy 7 years ago
parent 590e22b609
commit 29a9d330c2
No known key found for this signature in database
GPG Key ID: 6DF73A45EAA37C99

@ -1,4 +1,4 @@
FROM debian:jessie FROM debian:stretch
MAINTAINER "Andrey Arapov <andrey.arapov@nixaid.com>" MAINTAINER "Andrey Arapov <andrey.arapov@nixaid.com>"
EXPOSE 80 EXPOSE 80
@ -6,14 +6,14 @@ EXPOSE 80
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
# OS & Python env deps for taiga-back # OS & Python env deps for taiga-back
RUN apt-get update -qq \ RUN apt-get update \
&& apt-get install -y -- build-essential binutils-doc autoconf flex \ && apt-get install -y -- build-essential binutils-doc autoconf flex \
bison libjpeg-dev libfreetype6-dev zlib1g-dev libzmq3-dev \ bison libjpeg-dev libfreetype6-dev zlib1g-dev libzmq3-dev \
libgdbm-dev libncurses5-dev automake libtool libffi-dev curl git \ libgdbm-dev libncurses5-dev automake libtool libffi-dev curl git \
tmux gettext python3.4 python3.4-dev python3-pip libxml2-dev \ tmux gettext python3 python3-dev python3-pip libxml2-dev \
libxslt-dev libpq-dev virtualenv \ libxslt-dev virtualenvwrapper libssl1.0-dev \
nginx \ nginx && \
&& rm -rf -- /var/lib/apt/lists/* rm -rf -- /var/lib/apt/lists/*
RUN pip3 install circus gunicorn RUN pip3 install circus gunicorn
@ -29,12 +29,15 @@ RUN mkdir -p $DATA $DATA/media $DATA/static $DATA/logs /var/log/taiga \
WORKDIR $DATA WORKDIR $DATA
RUN ln -svf /bin/bash /bin/sh
# Install taiga-back # Install taiga-back
RUN git clone -b stable https://github.com/taigaio/taiga-back.git taiga-back \ RUN git clone -b stable https://github.com/taigaio/taiga-back.git taiga-back \
&& virtualenv -p /usr/bin/python3.4 venvtaiga \ && source /usr/share/virtualenvwrapper/virtualenvwrapper.sh \
&& . venvtaiga/bin/activate \ && mkvirtualenv -p /usr/bin/python3.5 venvtaiga \
&& workon venvtaiga \
&& cd taiga-back \ && cd taiga-back \
&& pip3 install -U setuptools \ && pip3 install --upgrade setuptools \
&& pip3 install -r requirements.txt \ && pip3 install -r requirements.txt \
&& deactivate && deactivate
@ -42,8 +45,6 @@ RUN git clone -b stable https://github.com/taigaio/taiga-back.git taiga-back \
RUN git clone -b stable https://github.com/taigaio/taiga-front-dist.git taiga-front-dist RUN git clone -b stable https://github.com/taigaio/taiga-front-dist.git taiga-front-dist
COPY robots.txt taiga-front-dist/dist/robots.txt COPY robots.txt taiga-front-dist/dist/robots.txt
USER $USER
USER root USER root
# Cleanups # Cleanups

@ -119,7 +119,7 @@ This file defines individual settings for Taiga.
**taiga.env** **taiga.env**
``` ```
GUNICORN_WORKERS=1 GUNICORN_WORKERS=1
SITE_URI=http://taiga SITE_URI=http://taiga.mydomain.com
PUBLIC_REGISTER=true PUBLIC_REGISTER=true
ADMIN_EMAIL=admin@mydomain.com ADMIN_EMAIL=admin@mydomain.com
NOREPLY_EMAIL=no-reply@mydomain.com NOREPLY_EMAIL=no-reply@mydomain.com

@ -45,8 +45,7 @@ chmod +x /already_initialized
unset DJANGO_SECRET_KEY TAIGA_DB_PASSWORD unset DJANGO_SECRET_KEY TAIGA_DB_PASSWORD
# Make sure the dynamic data is writable by the circus/gunicorn # Make sure the dynamic data is writable by the circus/gunicorn
chown -Rh $USER:$GROUP $DATA/media $DATA/taiga-back/taiga/locale $DATA/logs \ chown -Rh $USER:$GROUP $DATA/media $DATA/taiga-back/taiga/locale $DATA/logs
$DATA/static
# Make sure the PostgreSQL database is up and ready # Make sure the PostgreSQL database is up and ready
while ! ping -c 1 -W 1 $TAIGA_DB_HOST >/dev/null 2>&1; do while ! ping -c 1 -W 1 $TAIGA_DB_HOST >/dev/null 2>&1; do
@ -63,9 +62,12 @@ done
# running before it will be seeded/updated # running before it will be seeded/updated
/already_initialized /already_initialized
# TODO: in case if /already_initialized fails, the bad things will happen, like the default: admin:123123 ... need to make this more robust.
# Upgrade DB schemas, etc... # Upgrade DB schemas, etc...
# This is important when Taiga's codebase gets updated # This is important when Taiga's codebase gets updated
su -s /bin/sh $USER -c '. $DATA/venvtaiga/bin/activate su -s /bin/bash $USER -c 'source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
workon venvtaiga
cd $DATA/taiga-back cd $DATA/taiga-back
python manage.py migrate --noinput python manage.py migrate --noinput
/already_initialized || ( python manage.py loaddata initial_user \ /already_initialized || ( python manage.py loaddata initial_user \

@ -1,4 +1,4 @@
#!$DATA/venvtaiga/bin/python #!$HOME/.virtualenvs/venvtaiga/bin/python
# A simple script that checks whether the 'admin' user has been created. # A simple script that checks whether the 'admin' user has been created.
# It returns 0 on success and 1 on failure. # It returns 0 on success and 1 on failure.
# Based on this the /launch script will decide whether to create the default # Based on this the /launch script will decide whether to create the default

@ -22,10 +22,10 @@ stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4 stderr_stream.backup_count = 4
[env:taiga] [env:taiga]
PATH = ${DATA}/venvtaiga/bin:${ESC}PATH PATH = ${HOME}/.virtualenvs/venvtaiga/bin:${ESC}PATH
TERM=rxvt-256color TERM=rxvt-256color
SHELL=/bin/bash SHELL=/bin/bash
USER=taiga USER=taiga
LANG=en_US.UTF-8 LANG=en_US.UTF-8
HOME=${DATA} HOME=${DATA}
PYTHONPATH=${DATA}/venvtaiga/lib/python3.4/site-packages PYTHONPATH=${HOME}/.virtualenvs/venvtaiga/lib/python3.5/site-packages

Loading…
Cancel
Save