<commit_before>var chalk = require('chalk');

module.exports = function (shipit) {
  require('shipit-deploy')(shipit);
  require('shipit-shared')(shipit);

  shipit.initConfig({
    default: {
      workspace: '/tmp/app-koa2boilerplate',
      dirToCopy: '/tmp/app-koa2boilerplate/dist',
      deployTo: '/data/repos/app-koa2bp',
      repositoryUrl: '<EMAIL>:lanvige/koa2-boilerplate.git',
      branch: 'master',
      ignores: ['.DS_Store', '.git', 'node_modules'],
      rsync: ['--del'],
      keepReleases: 2,
      // key: '/Users/lanvige/.ssh/id_rsa.pub',
      shallowClone: false,
      shared: {
        overwrite: true,
        files: [
          'config/application.yml',
          'config/database.yml'
        ],
      }
    },
    staging: {
      servers: '<EMAIL>'
    }
  });

  shipit.task('pwd', function () {
    return shipit.remote('pwd');
  });

  // npm install & build
  shipit.blTask('npm-install', function () {
    shipit.log('yarn install.');
    return shipit.local('yarn install', { cwd: '/tmp/app-koa2boilerplate' })
  });

  shipit.blTask('npm-build', function () {
    shipit.log('npm build start.');
    return shipit.local('npm run build', { cwd: '/tmp/app-koa2boilerplate' })
  });

  shipit.on('fetched', function () {
    console.log('itis npm build');
    shipit.start(['npm-install', 'npm-build']);
  });

  // Docker build & run on Remote
  shipit.blTask('docker-build', function () {
    shipit.log(chalk.green('docker-compose build...'));
    // return shipit.remote('cd '+shipit.releasePath+'; pwd');
    return shipit.remote('cd /data/repos/app-koa2bp/current; docker-compose build');
  });

  shipit.blTask('docker-run', function () {
    shipit.log(chalk.green('docker-compose up start...'));
    return shipit.remote('cd /data/repos/app-koa2bp/current; docker-compose up')
  });

  shipit.on('deployed', function() {
    shipit.log(chalk.green('Docker deploy start'));
    shipit.start(['docker-build', 'docker-run']);
  })
};<commit_msg>update shipit config<commit_after>var chalk = require('chalk');

module.exports = function (shipit) {
  require('shipit-deploy')(shipit);
  require('shipit-shared')(shipit);

  shipit.initConfig({
    default: {
      workspace: '/tmp/app-koa2boilerplate',
      dirToCopy: '/tmp/app-koa2boilerplate/dist',
      deployTo: '/data/repos/app-koa2bp',
      repositoryUrl: '<EMAIL>:lanvige/koa2-boilerplate.git',
      branch: 'master',
      ignores: ['.DS_Store', '.git', 'node_modules'],
      rsync: ['--del'],
      keepReleases: 2,
      // key: '/Users/lanvige/.ssh/id_rsa.pub',
      shallowClone: false,
      shared: {
        overwrite: true,
        files: [
          'config/application.yml',
          'config/database.yml'
        ],
      }
    },
    staging: {
      servers: '<EMAIL>'
    }
  });

  shipit.task('pwd', function () {
    return shipit.remote('pwd');
  });

  // npm install & build
  shipit.blTask('npm-install', function () {
    shipit.log('yarn install.');
    return shipit.local('yarn install', { cwd: '/tmp/app-koa2boilerplate' })
  });

  shipit.blTask('npm-build', function () {
    shipit.log('npm build start.');
    return shipit.local('npm run build', { cwd: '/tmp/app-koa2boilerplate' })
  });

  shipit.on('fetched', function () {
    console.log('itis npm build');
    shipit.start(['npm-install', 'npm-build']);
  });

  // Docker build & run on Remote
  shipit.blTask('docker-build', function () {
    shipit.log(chalk.green('docker-compose build...'));
    // return shipit.remote('cd '+shipit.releasePath+'; pwd');
    return shipit.remote('cd /data/repos/app-koa2bp/current; docker-compose build');
  });

  shipit.blTask('docker-run', function () {
    shipit.log(chalk.green('docker-compose up start...'));
    return shipit.remote('cd /data/repos/app-koa2bp/current; docker-compose up -d --build')
  });

  shipit.on('deployed', function() {
    shipit.log(chalk.green('Docker deploy start'));
    shipit.start(['docker-run']);
  })
};
{'fraction_non_alphanumeric': 0.1922110552763819, 'fraction_numerical': 0.004522613065326633, 'mean_word_length': 2.9889779559118237, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7097801', 'n_tokens_mistral': 1452, 'n_tokens_neox': 1382, 'n_words': 223}