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
| """ | |
| This fabfile automates deployment of and moving data between Django apps | |
| in development (devel), staging (stage), and production (live) | |
| environments. | |
| Use it as: | |
| fab -H user@host:port deploy:stage | |
| Requirements |
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
| 1) Setup Server on Vultr | |
| Select “create New Server(e.g. 123.123.123.123)”, select “Ubuntu 14.04 LTS” | |
| Once your server has been created, wait for installation to complete. | |
| SSH into your Server as root and run the following commands: | |
| # login server by SSH | |
| ssh root@dokku.me | |
| # Updating apt-get | |
| sudo apt-get update # Fetches the list of available updates | |
| sudo apt-get upgrade # Strictly upgrades the current packages | |
| sudo apt-get dist-upgrade # Installs updates (new ones) |
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
| # -*- coding: utf-8 -*- | |
| import json | |
| import requests | |
| import getpass | |
| import random | |
| from fabric.api import * | |
| from fabric.operations import * | |
| """ | |
| Set up servers locations. This can be programatically generated too. |
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
| # -*- coding: utf-8 -*- | |
| import os | |
| import random | |
| import requests | |
| import json | |
| import datetime | |
| from fabric.api import * | |
| """ |