Last active
July 24, 2017 10:23
-
-
Save roman-karpovich/dc8cae277ceadd6cdc885f98e34b98de to your computer and use it in GitHub Desktop.
migrate nrs to new deployer
This file contains 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
install dependencies | |
sudo apt-get update | |
sudo apt-get -y --no-upgrade install python3-pip python3-dev npm monit | |
install firefox | |
sudo apt-get install firefox | |
install webdrivers | |
wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz | |
sudo sh -c 'tar -x geckodriver -zf geckodriver-v0.18.0-linux64.tar.gz -O > /usr/bin/geckodriver' | |
sudo chmod +x /usr/bin/geckodriver | |
rm geckodriver-v0.18.0-linux64.tar.gz | |
install nvm | |
fab node.prepare_node:staging | |
deploy frontend | |
fab deploy_frontend:staging | |
config nginx | |
fab config_nginx:staging | |
fab restart:staging | |
config .env file | |
fab config_django_env:staging | |
re-create virtualenv | |
rmvirtualenv nrs_server | |
mkvirtualenv nrs_server -p /usr/bin/python3 | |
echo 'export DJANGO_SETTINGS_MODULE="config.settings.prod"' >> /home/ubuntu/venv/nrs_server/bin/postactivate | |
config gunicorn | |
fab config_gunicorn:staging | |
config celery | |
fab prepare_celery:staging | |
fab config_celery:staging | |
config flower | |
fab config_flower:staging | |
fab config_nginx:staging | |
deploy backend | |
fab deploy:staging | |
kill old celery | |
sudo htop -> beat -> python | |
update site in admin | |
config letsencrypt | |
fab config_letsencrypt:staging | |
config monit | |
fab config_monit:staging | |
fab start_monit:staging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment