Skip to content

Instantly share code, notes, and snippets.

@mrts
mrts / fabfile.py
Created January 7, 2011 00:31
Automatic remote deployment with Fabric.
"""
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
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)
@silent1mezzo
silent1mezzo / fabfile.py
Last active February 24, 2024 14:13
An example deployment using Fabric
# -*- 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.
@silent1mezzo
silent1mezzo / fabfile-symlink.py
Created January 4, 2018 21:46
An example deployment using Fabric and Symlinks