def full_deploy(static=False): """ Full scenemachine deploy Usage: fab appbalancer full_deploy:static=True Remember to handle requirements separately. """ git_pull_scenemachine() settings_local("prod") git.pull() if static: django.staticfiles() supervisor.restart()
def launch_app(site): """ Launches a new django app by checking it out from github and building the virtualenv. Additionally the configuration management will need to be run to configure the webserver. """ run("mkdir --parents {0}{1}/".format(settings.SITES_ROOT, site)) if not exists("{0}{1}/{1}/".format(settings.SITES_ROOT, site)): with cd("{0}{1}/".format(settings.SITES_ROOT, site)): run("git clone --branch master [email protected]:{0}/{1}.git".format(settings.GITHUB_USERNAME, site)) virtualenv.generate_virtualenv("prod", site) django.generate_settings_local("prod", "scenemachine", site) # TODO: remove hardcoded database name. django.generate_settings_main("prod", site) django.staticfiles(site) django.syncdb(site)
def deploy_git_rizumu(): git.pull("rizumu") git.pull_scenemachine() django.staticfiles("rizumu") supervisor.restart("rizumu")