make taiga grsec-friendly

This commit is contained in:
Andy 2016-05-20 18:12:19 +02:00
parent a93eaa4a4f
commit 404bd1db9d
Signed by: arno
GPG Key ID: 368DDA2E9A471EAC
3 changed files with 18 additions and 8 deletions

View File

@ -25,20 +25,23 @@ ENV HOME /home/$USER
ENV DATA /opt/taiga ENV DATA /opt/taiga
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin -g $GROUP $USER RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin -g $GROUP $USER
RUN mkdir -p $DATA $DATA/media $DATA/static $DATA/logs /var/log/taiga \ RUN mkdir -p $DATA $DATA/media $DATA/static $DATA/logs /var/log/taiga \
&& chown -Rh $USER:$GROUP $DATA /var/log/taiga && chown -Rh $USER:$GROUP /var/log/taiga
WORKDIR $DATA
# Install taiga-back # Install taiga-back
USER $USER RUN git clone -b stable https://github.com/taigaio/taiga-back.git taiga-back \
WORKDIR $DATA
RUN git clone -b stable https://github.com/taigaio/taiga-back.git $DATA/taiga-back \
&& virtualenv -p /usr/bin/python3.4 venvtaiga \ && virtualenv -p /usr/bin/python3.4 venvtaiga \
&& . venvtaiga/bin/activate \ && . venvtaiga/bin/activate \
&& cd $DATA/taiga-back \ && cd taiga-back \
&& pip3 install -r requirements.txt \ && pip3 install -r requirements.txt \
&& deactivate && deactivate
# Install taiga-front (compiled) # Install taiga-front (compiled)
RUN git clone -b stable https://github.com/taigaio/taiga-front-dist.git $DATA/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
USER $USER
USER root USER root

4
launch
View File

@ -44,8 +44,8 @@ chmod +x /already_initialized
# Keep sensitive information out of here # Keep sensitive information out of here
unset DJANGO_SECRET_KEY TAIGA_DB_PASSWORD unset DJANGO_SECRET_KEY TAIGA_DB_PASSWORD
# Make sure the data is readable # Make sure the dynamic data is writable by the circus/gunicorn
chown -Rh $USER:$GROUP $DATA chown -Rh $USER:$GROUP $DATA/media $DATA/taiga-back/taiga/locale $DATA/logs
# 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

7
robots.txt Normal file
View File

@ -0,0 +1,7 @@
# Tell robots we don't want indexation
User-agent: *
Disallow: /
# You rush a miracle man, you get rotten miracles.
#
# -- Miracle Max --