<commit_before>from fabric.api import roles, env, run, cd, sudo
from fabric.contrib.files import upload_template

env.hosts = [
    '<EMAIL>',
    '<EMAIL>',
    '<EMAIL>',
    '<EMAIL>',
]

env.roledefs = {
    'dev': ['<EMAIL>', ],
    'staging': ['<EMAIL>'],
    'production': ['<EMAIL>'],
    'build': ['<EMAIL>'],
}


def echo():
    run('ls /')

def ensure_docker_compose():
    sudo('which docker-compose || pip install docker-compose')

@roles('build')
def build_dockerimage(branch_or_tag='develop'):

    with cd('~/build_setup/'):
        run('./update_env.sh')

    with cd('/home/ubuntu/build_setup/dockersetup/projects/nutsurv'):
        run('BRANCH={} ./run_build.sh'.format(branch_or_tag))
        run('docker push docker-registry.eocng.org/ehealthafrica/nutsurv:{}'.format(<commit_msg>Make deployment script point to new servers<commit_after>from fabric.api import roles, env, run, cd, sudo
from fabric.contrib.files import upload_template

env.hosts = [
    '<EMAIL>',
    '<EMAIL>',
    '<EMAIL>',
    '<EMAIL>',
]

env.roledefs = {
    'dev': ['<EMAIL>', ],
    'staging': ['<EMAIL>'],
    'production': ['<EMAIL>'],
    'build': ['<EMAIL>'],
}


def echo():
    run('ls /')

def ensure_docker_compose():
    sudo('which docker-compose || pip install docker-compose')

@roles('build')
def build_dockerimage(branch_or_tag='develop'):

    with cd('~/build_setup/'):
        run('./update_env.sh')

    with cd('/home/ubuntu/build_setup/dockersetup/projects/nutsurv'):
        run('BRANCH={} ./run_build.sh'.format(branch_or_tag))
        run('docker push docker-registry.eocng.org/ehealthafrica/nutsurv:{}'.format(
{'fraction_non_alphanumeric': 0.19730392156862744, 'fraction_numerical': 0.0, 'mean_word_length': 3.8171091445427727, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2421927', 'n_tokens_mistral': 607, 'n_tokens_neox': 587, 'n_words': 103}