· 9 years ago · Jun 23, 2016, 10:57 PM
1#!/bin/bash
2
3# Written for Ubuntu 16.04 and last tested 6/23/2016
4# -- JD
5
6# Create user taiga and homedir
7useradd -m -d /home/taiga taiga
8
9# Install all deps from install guide
10apt-get install -y build-essential binutils-doc autoconf flex bison libjpeg-dev \
11libfreetype6-dev zlib1g-dev libzmq3-dev libgdbm-dev libncurses5-dev \
12automake libtool libffi-dev curl git tmux gettext \
13postgresql-9.5 postgresql-contrib-9.5 postgresql-doc-9.5 postgresql-server-dev-9.5 \
14python3 python3-pip python-dev python3-dev python-pip virtualenvwrapper \
15libxml2-dev libxslt-dev
16
17# Create postgres user and database
18sudo -u postgres createuser taiga
19sudo -u postgres createdb taiga -O taiga
20
21# Run these commands as user taiga in /home/taiga
22cd /home/taiga
23sudo -u taiga git clone https://github.com/taigaio/taiga-back.git taiga-back
24cd /home/taiga/taiga-back
25sudo -u taiga git checkout stable
26sudo -u taiga mkvirtualenv -p /usr/bin/python3.5 taiga
27sudo -u taiga pip install -r requirements.txt
28sudo -u taiga python manage.py migrate --noinput
29sudo -u taiga python manage.py loaddata initial_user
30sudo -u taiga python manage.py loaddata initial_project_templates
31sudo -u taiga python manage.py loaddata initial_role
32sudo -u taiga python manage.py compilemessages
33sudo -u taiga python manage.py collectstatic --noinput
34sudo -u taiga echo '
35from .common import *
36
37MEDIA_URL = "http://biof-pm.colorado.edu/media/"
38STATIC_URL = "http://biof-pm.colorado.edu/static/"
39ADMIN_MEDIA_PREFIX = "http://biof-pm.colorado.edu/static/admin/"
40SITES["front"]["scheme"] = "http"
41SITES["front"]["domain"] = "biof-pm.colorado.edu"
42
43SECRET_KEY = "roundtheraggedrocksbenrollsoncassidy"
44
45DEBUG = False
46TEMPLATE_DEBUG = False
47PUBLIC_REGISTER_ENABLED = True
48
49DEFAULT_FROM_EMAIL = "biof-pm@colorado.edu"
50SERVER_EMAIL = DEFAULT_FROM_EMAIL
51
52# Uncomment and populate with proper connection parameters
53# for enable email sending. EMAIL_HOST_USER should end by @domain.tld
54#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
55#EMAIL_USE_TLS = False
56#EMAIL_HOST = "localhost"
57#EMAIL_HOST_USER = ""
58#EMAIL_HOST_PASSWORD = ""
59#EMAIL_PORT = 25
60
61# Uncomment and populate with proper connection parameters
62# for enable github login/singin.
63#GITHUB_API_CLIENT_ID = "yourgithubclientid"
64#GITHUB_API_CLIENT_SECRET = "yourgithubclientsecret"
65
66' >> /home/taiga/taiga-back/settings/local.py
67cd /home/taiga
68sudo -u taiga git clone https://github.com/taigaio/taiga-front-dist.git taiga-front-dist
69cd /home/taiga/taiga-front-dist
70sudo -u taiga git checkout stable