def _generate_deploy_files(self): app_type = detection.detect_app_type(self) procfile = _parse_procfile() shared.run_cmd('mkdir -p {0}'.format(shared.DEPLOY_DIR)) with shared.chdir(shared.DEPLOY_DIR): _apply_template2( app_type.init_template, 'initialize', app_type.init_template_context, mode=0700 ) _apply_template2( 'update', 'update', { 'update_command': app_type.update_command }, mode=0700 ) _apply_template2( 'run-command', 'run-command', { 'env_vars_file': shared.ENV_VARS_FILE }, mode=0700 ) self._create_process_type_run_scripts(procfile) self._create_supervisor_configs(procfile.keys())
def _create_supervisor_configs(self, process_types): SUPERVISOR_DIR = 'supervisor' shared.run_cmd('mkdir -p {0}'.format(SUPERVISOR_DIR)) with shared.chdir(SUPERVISOR_DIR): for process_type in process_types: self._create_supervisor_config(process_type)