Beispiel #1
0
def update_conf():
    if env.nginx_serves_static:
        fab_nginx.copy_conf_files(env.local_conf_folder, env.deploy_folder)
    else:
        fab_apache.copy_conf_files(env.local_conf_folder, env.deploy_folder)

    fab_django.copy_conf_files(env.local_conf_folder, env.deploy_folder,\
        env.is_mobile)
    cron.copy_conf_files(env.local_conf_folder, env.deploy_folder)
Beispiel #2
0
def update_conf():
    if env.nginx_serves_static:
        fab_nginx.copy_conf_files(env.local_conf_folder, env.deploy_folder)
    else:
        fab_apache.copy_conf_files(env.local_conf_folder, env.deploy_folder)

    fab_django.copy_conf_files(env.local_conf_folder, env.deploy_folder,\
        env.is_mobile)
    cron.copy_conf_files(env.local_conf_folder, env.deploy_folder)
Beispiel #3
0
def deploy():
  with cd(env.deploy_folder):
    fab_django.deploy()
  fab_django.copy_conf_files(env.local_conf_folder, env.deploy_folder, env.is_mobile)
  with cd(env.deploy_folder):
    fab_django.syncdb()
  update_conf()
  fab_django.restart()
  # in theory apache restart is not needed...
  fab_apache.restart()
  deploy_info()
Beispiel #4
0
def update_cron_and_app():
    with cd(env.deploy_folder):
        fab_django.deploy()
    fab_django.copy_conf_files(env.local_conf_folder, env.deploy_folder,\
        env.is_mobile)
    cron.copy_conf_files(env.local_conf_folder, env.deploy_folder)
    if env.nginx_serves_static:
    	#TODO supervisor
    	run('mkdir -p logs')
    	run('mkdir -p supervisord')
    	fab_supervisord.reload([env.supervisord_app_name])
    else:
        fab_apache.copy_conf_files(env.local_conf_folder, env.deploy_folder)
Beispiel #5
0
def deploy():
    with cd(env.deploy_folder):
        fab_django.deploy()
    fab_django.copy_conf_files(env.local_conf_folder, \
        env.deploy_folder, env.is_mobile)
    with cd(env.deploy_folder):
        fab_django.syncdb()
    update_conf()
    fab_django.restart()
    if env.nginx_serves_static:
        fab_nginx.restart()
    else:
        fab_apache.restart()
    deploy_info()
Beispiel #6
0
def deploy():
    with cd(env.deploy_folder):
        fab_django.deploy()
    fab_django.copy_conf_files(env.local_conf_folder, \
        env.deploy_folder, env.is_mobile)
    with cd(env.deploy_folder):
        fab_django.syncdb()
    update_conf()
    fab_django.restart()
    # in theory apache restart is not needed...
    fab_apache.restart()
    if env.nginx_serves_static:
        fab_nginx.restart()
    deploy_info()
Beispiel #7
0
def update_conf():
    if env.nginx_serves_static:
        fab_nginx.copy_conf_files(env.local_conf_folder, env.deploy_folder, env.is_mobile)
    	#TODO supervisor
    	run('mkdir -p logs')
    	run('mkdir -p supervisord')
    	fab_supervisord.install(None)
    	fab_supervisord.copy_conf_files(env.local_conf_folder, env.deploy_folder)
    	sudo('cp supervisord/supervisord.conf /etc/supervisord.conf')
    	fab_supervisord.reload([env.supervisord_app_name])
    else:
        fab_apache.copy_conf_files(env.local_conf_folder, env.deploy_folder)

    fab_django.copy_conf_files(env.local_conf_folder, env.deploy_folder,\
        env.is_mobile)
    cron.copy_conf_files(env.local_conf_folder, env.deploy_folder)
Beispiel #8
0
def install_app():
    """ install django app """
    run("mkdir -p %s" % env.deploy_folder)
    fab_django.prepare_env(env.local_conf_folder, env.deploy_folder)
    update_conf()
    fab_django.copy_conf_files(env.local_conf_folder, \
        env.deploy_folder, env.is_mobile)
    with cd(env.deploy_folder):
        fab_django.clean_pyc()
        fab_django.syncdb()
        fab_django.create_admin()
        fab_django.load_data(env.fixtures_name)
    
    fab_django.restart_app(env.app_name)
    if env.nginx_serves_static:
        fab_nginx.restart()
    else:
        fab_apache.restart()
Beispiel #9
0
def install_app():
    """ install django app """
    sudo("mkdir -p %s" % env.deploy_folder)
    sudo("chown -R %s %s" % (env.user, env.deploy_folder))
    fab_django.prepare_env(env.local_conf_folder, env.deploy_folder)
    update_conf()
    fab_django.copy_conf_files(env.local_conf_folder, \
        env.deploy_folder, env.is_mobile)
    with cd(env.deploy_folder):
        fab_django.clean_pyc()
        fab_django.syncdb()
        fab_django.create_admin()
        fab_django.load_data(env.fixtures_name)
    fab_supervisor.reload()
    fab_django.restart_app(env.app_name)
    if env.nginx_serves_static:
        fab_nginx.restart()
    else:
        fab_apache.restart()
Beispiel #10
0
def update_conf():
    fab_apache.copy_conf_files(env.local_conf_folder, env.deploy_folder)
    fab_django.copy_conf_files(env.local_conf_folder, env.deploy_folder, env.is_mobile)
    cron.copy_conf_files(env.local_conf_folder, env.deploy_folder)