updates
This commit is contained in:
parent
590e22b609
commit
29a9d330c2
23
Dockerfile
23
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM debian:jessie
|
||||
FROM debian:stretch
|
||||
MAINTAINER "Andrey Arapov <andrey.arapov@nixaid.com>"
|
||||
EXPOSE 80
|
||||
|
||||
@ -6,14 +6,14 @@ EXPOSE 80
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# 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 \
|
||||
bison libjpeg-dev libfreetype6-dev zlib1g-dev libzmq3-dev \
|
||||
libgdbm-dev libncurses5-dev automake libtool libffi-dev curl git \
|
||||
tmux gettext python3.4 python3.4-dev python3-pip libxml2-dev \
|
||||
libxslt-dev libpq-dev virtualenv \
|
||||
nginx \
|
||||
&& rm -rf -- /var/lib/apt/lists/*
|
||||
tmux gettext python3 python3-dev python3-pip libxml2-dev \
|
||||
libxslt-dev virtualenvwrapper libssl1.0-dev \
|
||||
nginx && \
|
||||
rm -rf -- /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install circus gunicorn
|
||||
|
||||
@ -29,12 +29,15 @@ RUN mkdir -p $DATA $DATA/media $DATA/static $DATA/logs /var/log/taiga \
|
||||
|
||||
WORKDIR $DATA
|
||||
|
||||
RUN ln -svf /bin/bash /bin/sh
|
||||
|
||||
# Install taiga-back
|
||||
RUN git clone -b stable https://github.com/taigaio/taiga-back.git taiga-back \
|
||||
&& virtualenv -p /usr/bin/python3.4 venvtaiga \
|
||||
&& . venvtaiga/bin/activate \
|
||||
&& source /usr/share/virtualenvwrapper/virtualenvwrapper.sh \
|
||||
&& mkvirtualenv -p /usr/bin/python3.5 venvtaiga \
|
||||
&& workon venvtaiga \
|
||||
&& cd taiga-back \
|
||||
&& pip3 install -U setuptools \
|
||||
&& pip3 install --upgrade setuptools \
|
||||
&& pip3 install -r requirements.txt \
|
||||
&& 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
|
||||
COPY robots.txt taiga-front-dist/dist/robots.txt
|
||||
|
||||
USER $USER
|
||||
|
||||
USER root
|
||||
|
||||
# Cleanups
|
||||
|
@ -119,7 +119,7 @@ This file defines individual settings for Taiga.
|
||||
**taiga.env**
|
||||
```
|
||||
GUNICORN_WORKERS=1
|
||||
SITE_URI=http://taiga
|
||||
SITE_URI=http://taiga.mydomain.com
|
||||
PUBLIC_REGISTER=true
|
||||
ADMIN_EMAIL=admin@mydomain.com
|
||||
NOREPLY_EMAIL=no-reply@mydomain.com
|
||||
|
8
launch
8
launch
@ -45,8 +45,7 @@ chmod +x /already_initialized
|
||||
unset DJANGO_SECRET_KEY TAIGA_DB_PASSWORD
|
||||
|
||||
# Make sure the dynamic data is writable by the circus/gunicorn
|
||||
chown -Rh $USER:$GROUP $DATA/media $DATA/taiga-back/taiga/locale $DATA/logs \
|
||||
$DATA/static
|
||||
chown -Rh $USER:$GROUP $DATA/media $DATA/taiga-back/taiga/locale $DATA/logs
|
||||
|
||||
# Make sure the PostgreSQL database is up and ready
|
||||
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
|
||||
/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...
|
||||
# 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
|
||||
python manage.py migrate --noinput
|
||||
/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.
|
||||
# It returns 0 on success and 1 on failure.
|
||||
# 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
|
||||
|
||||
[env:taiga]
|
||||
PATH = ${DATA}/venvtaiga/bin:${ESC}PATH
|
||||
PATH = ${HOME}/.virtualenvs/venvtaiga/bin:${ESC}PATH
|
||||
TERM=rxvt-256color
|
||||
SHELL=/bin/bash
|
||||
USER=taiga
|
||||
LANG=en_US.UTF-8
|
||||
HOME=${DATA}
|
||||
PYTHONPATH=${DATA}/venvtaiga/lib/python3.4/site-packages
|
||||
PYTHONPATH=${HOME}/.virtualenvs/venvtaiga/lib/python3.5/site-packages
|
||||
|
Loading…
Reference in New Issue
Block a user