Created
October 25, 2016 13:23
-
-
Save bsormagec/da7e8a75de8f38c698f43d915852a728 to your computer and use it in GitHub Desktop.
Taiga.io Ubuntu 15.10 DigitalOcean Install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #good luck. This works until you get to circus/nginx, and then you get nothing. | |
| #circus is horrible. running an application like this in virtualenv is horrible. | |
| #the whole thing is horrible. | |
| adduser taiga | |
| nano /etc/sudoers | |
| # add "taiga ALL=(ALL) NOPASSWD:ALL" without quotes then save the file. | |
| cd /home/taiga | |
| su - taiga | |
| sudo apt update | |
| sudo apt-get -y install git | |
| sudo apt-get -y install python | |
| #sudo apt-get -y install cython | |
| sudo apt-get install -y build-essential binutils-doc autoconf flex bison libjpeg-dev | |
| sudo apt-get install -y libfreetype6-dev zlib1g-dev libzmq3-dev libgdbm-dev libncurses5-dev | |
| sudo apt-get install -y automake libtool libffi-dev curl git tmux gettext | |
| sudo apt-get install -y postgresql-9.4 postgresql-contrib-9.4 | |
| sudo apt-get install -y postgresql-doc-9.4 postgresql-server-dev-9.4 | |
| sudo -u postgres createuser taiga | |
| sudo -u postgres createdb taiga -O taiga | |
| sudo apt-get install -y python3 python3-pip python-dev python3-dev python-pip virtualenvwrapper | |
| sudo apt-get install libxml2-dev libxslt-dev | |
| pip3 install virtualenvwrapper | |
| bash | |
| cd ~ | |
| git clone https://github.com/taigaio/taiga-back.git taiga-back | |
| cd taiga-back | |
| git checkout stable | |
| virtualenv -p /usr/bin/python3.4 taiga | |
| cd ~/taiga-back/taiga/bin | |
| source activate | |
| #verify you're in the virtualenv by making sure that this shows python3.4 | |
| python --version | |
| cd ~/taigaback | |
| nano requirements.txt | |
| #change lxml==**** to lxml==3.5.0b1 | |
| #comment out the last line in the file | |
| #what the fuck why? | |
| #apt-get install postgresql-server-dev-9.4 | |
| pip install -r requirements.txt | |
| #optional? | |
| #apt-get install libxml2 libxslt1-dev | |
| #optional? | |
| 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 | |
| python manage.py collectstatic --noinput | |
| nano settings/local.py | |
| #paste this in there. Change example.com to whatever you need it to be. Be SURE to leave the http:// in front of it! | |
| ##################################################### | |
| ##################################################### | |
| from .common import * | |
| from .celery import * | |
| MEDIA_URL = "http://example.com/media/" | |
| STATIC_URL = "http://example.com/static/" | |
| ADMIN_MEDIA_PREFIX = "http://example.com/static/admin/" | |
| SITES["front"]["scheme"] = "http" | |
| SITES["front"]["domain"] = "example.com" | |
| SECRET_KEY = "theveryultratopsecretkey" | |
| DEBUG = False | |
| TEMPLATE_DEBUG = False | |
| PUBLIC_REGISTER_ENABLED = True | |
| DEFAULT_FROM_EMAIL = "no-reply@example.com" | |
| SERVER_EMAIL = DEFAULT_FROM_EMAIL | |
| BROKER_URL = 'amqp://guest:guest@localhost:5672//' | |
| CELERY_RESULT_BACKEND = 'redis://localhost:6379/0' | |
| CELERY_ENABLED = True | |
| # Uncomment and populate with proper connection parameters | |
| # for enable email sending. EMAIL_HOST_USER should end by @domain.tld | |
| #EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" | |
| #EMAIL_USE_TLS = False | |
| #EMAIL_HOST = "localhost" | |
| #EMAIL_HOST_USER = "" | |
| #EMAIL_HOST_PASSWORD = "" | |
| #EMAIL_PORT = 25 | |
| # Uncomment and populate with proper connection parameters | |
| # for enable github login/singin. | |
| #GITHUB_API_CLIENT_ID = "yourgithubclientid" | |
| #GITHUB_API_CLIENT_SECRET = "yourgithubclientsecret" | |
| ######################################################## | |
| ######################################################## | |
| python manage.py runserver & | |
| ctrl + c | |
| curl 127.0.0.1:8000/api/v1/ | |
| #you should see a LOT of stuff. | |
| fg | |
| ctrl+c | |
| ###################################### | |
| ###################################### | |
| ###################################### | |
| deactivate | |
| sudo apt-get install -y rabbitmq-server redis-server | |
| nano /home/taiga/circus.ini | |
| #paste this in, then save it! | |
| ################################# | |
| ################################# | |
| [circus] | |
| check_delay = 5 | |
| endpoint = tcp://127.0.0.1:5555 | |
| pubsub_endpoint = tcp://127.0.0.1:5556 | |
| statsd = true | |
| [watcher:taiga] | |
| working_dir = /home/taiga/taiga-back | |
| cmd = gunicorn | |
| args = -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi | |
| uid = taiga | |
| numprocesses = 1 | |
| autostart = true | |
| send_hup = true | |
| stdout_stream.class = FileStream | |
| stdout_stream.filename = /home/taiga/logs/gunicorn.stdout.log | |
| stdout_stream.max_bytes = 10485760 | |
| stdout_stream.backup_count = 4 | |
| stderr_stream.class = FileStream | |
| stderr_stream.filename = /home/taiga/logs/gunicorn.stderr.log | |
| stderr_stream.max_bytes = 10485760 | |
| stderr_stream.backup_count = 4 | |
| [env:taiga] | |
| PATH = /home/taiga/taiga/bin:$PATH | |
| TERM=rxvt-256color | |
| SHELL=/bin/bash | |
| USER=taiga | |
| LANG=en_US.UTF-8 | |
| HOME=/home/taiga | |
| PYTHONPATH=/home/taiga/taiga/lib/python3.4/site-packages | |
| [watcher:taiga-celery] | |
| working_dir = /home/taiga/taiga-back | |
| cmd = celery | |
| args = -A taiga worker -c 4 | |
| uid = taiga | |
| numprocesses = 1 | |
| autostart = true | |
| send_hup = true | |
| stdout_stream.class = FileStream | |
| stdout_stream.filename = /home/taiga/logs/celery.stdout.log | |
| stdout_stream.max_bytes = 10485760 | |
| stdout_stream.backup_count = 4 | |
| stderr_stream.class = FileStream | |
| stderr_stream.filename = /home/taiga/logs/celery.stderr.log | |
| stderr_stream.max_bytes = 10485760 | |
| stderr_stream.backup_count = 4 | |
| [env:taiga-celery] | |
| PATH = /home/taiga/taiga/bin:$PATH | |
| TERM=rxvt-256color | |
| SHELL=/bin/bash | |
| USER=taiga | |
| LANG=en_US.UTF-8 | |
| HOME=/home/taiga | |
| PYTHONPATH=/home/taiga/taiga/lib/python3.4/site-packages | |
| ############################## | |
| ############################## | |
| cd ~ | |
| git clone https://github.com/taigaio/taiga-front-dist.git taiga-front-dist | |
| cd taiga-front-dist | |
| git checkout stable | |
| nano /home/taiga/taiga-front-dist/dist/js/conf.json | |
| #paste this, changing the example.com to whatever you need it to be again. Remember to keep the http://! | |
| ########################### | |
| ########################### | |
| { | |
| "api": "http://example.com/api/v1/", | |
| "eventsUrl": "ws://example.com/events", | |
| "debug": "true", | |
| "publicRegisterEnabled": true, | |
| "feedbackEnabled": true, | |
| "privacyPolicyUrl": null, | |
| "termsOfServiceUrl": null, | |
| "maxUploadFileSize": null, | |
| "contribPlugins": [] | |
| } | |
| ############################ | |
| ############################ | |
| sudo pip2 install circus | |
| mkdir -p ~/logs | |
| sudo nano /etc/init/circus.conf | |
| #paste this! | |
| ############################################# | |
| start on filesystem and net-device-up IFACE=lo | |
| stop on runlevel [016] | |
| respawn | |
| exec /home/taiga/.local/bin/circusd /home/taiga/circus.ini | |
| ############################################## | |
| /home/taiga/.local/bin /home/taiga/circus.ini & | |
| ctrl+c | |
| sudo apt-get install -y nginx | |
| sudo nano /etc/nginx/sites-available/taiga | |
| #paste this! | |
| ################################ | |
| ################################ | |
| server { | |
| listen 80 default_server; | |
| server_name _; | |
| large_client_header_buffers 4 32k; | |
| client_max_body_size 50M; | |
| charset utf-8; | |
| access_log /home/taiga/logs/nginx.access.log; | |
| error_log /home/taiga/logs/nginx.error.log; | |
| # Frontend | |
| location / { | |
| root /home/taiga/taiga-front-dist/dist/; | |
| try_files $uri $uri/ /index.html; | |
| } | |
| # Backend | |
| location /api { | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Scheme $scheme; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_pass http://127.0.0.1:8001/api; | |
| proxy_redirect off; | |
| } | |
| # Django admin access (/admin/) | |
| location /admin { | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Scheme $scheme; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_pass http://127.0.0.1:8001$request_uri; | |
| proxy_redirect off; | |
| } | |
| # Static files | |
| location /static { | |
| alias /home/taiga/taiga-back/static; | |
| } | |
| # Media files | |
| location /media { | |
| alias /home/taiga/taiga-back/media; | |
| } | |
| } | |
| ###################################### | |
| ###################################### | |
| sudo rm /etc/nginx/sites-enabled/default | |
| sudo ln -s /etc/nginx/sites-available/taiga /etc/nginx/sites-enabled/taiga | |
| sudo nginx -t | |
| sudo service nginx restart | |
| holy christ goddamn almighty that took literally 7 hours. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment