module.exports = {
  apps: [
    {
      name: 'easyv_admin'
    }
  ],
  deploy: {
    test: {
      user: 'root',
      host: '172.16.10.70',
      ref: 'origin/test',
      repo: 'ssh://git@gitlab.prod.dtstack.cn:10022/visdev/easyvadmin.git',
      path: '/app/easyv_admin_pm2',
      'post-deploy':
        'npm install && npm run build && rm -rf ../../easyv_admin/dist_new && mv dist ../../easyv_admin/dist_new && cd ../../easyv_admin && rm -rf ./dist_back && mv dist ./dist_back && rm -rf dist && mv dist_new ./dist'
    },
    testBack: {
      user: 'root',
      host: '172.16.10.70',
      ref: 'origin/test',
      repo: 'ssh://git@gitlab.prod.dtstack.cn:10022/visdev/easyvadmin.git',
      path: '/app/easyv_admin_pm2',
      'post-deploy': 'cd ../../easyv_admin && rm -rf dist && mv ./dist_back ./dist'
    },
    pro: {
      user: 'root',
      host: '116.62.60.125',
      ref: 'origin/master',
      repo: 'ssh://git@gitlab.prod.dtstack.cn:10022/visdev/easyvadmin.git',
      path: '/app/easyv_admin_pm2',
      'post-deploy':
        'npm install && npm run build && rm -rf ../../easyv_admin/dist_new && mv dist ../../easyv_admin/dist_new && cd ../../easyv_admin && rm -rf ./dist_back && mv dist dist_back && rm -rf dist && mv dist_new ./dist'
    },
    proBack: {
      user: 'root',
      host: '116.62.60.125',
      ref: 'origin/master',
      repo: 'ssh://git@gitlab.prod.dtstack.cn:10022/visdev/easyvadmin.git',
      path: '/app/easyv_admin_pm2',
      'post-deploy': 'cd ../../easyv_admin && rm -rf dist && mv ./dist_back ./dist'
    },
    develop: {
      user: 'root',
      host: '172.16.101.251',
      ref: 'origin/develop',
      repo: 'ssh://git@gitlab.prod.dtstack.cn:10022/visdev/easyvadmin.git',
      path: '/app/easyv_admin',
      'post-deploy':
        'npm install && npm run build && rm -rf ../dist_new && mv dist ../dist_new && cd ../ && rm -rf ./dist_back && mv dist dist_back && rm -rf dist && mv dist_new ./dist'
    },
    developBack: {
      user: 'root',
      host: '172.16.101.251',
      ref: 'origin/develop',
      repo: 'ssh://git@gitlab.prod.dtstack.cn:10022/visdev/easyvadmin.git',
      path: '/app/easyv_admin',
      'post-deploy': 'cd ../ && rm -rf dist && mv ./dist_back ./dist'
    }
  }
};
