forked from CaitinChen/pingcap.github.io
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshipitfile.js
34 lines (29 loc) · 1.02 KB
/
shipitfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Learnt from:
// https://git.vnv.ch/snippets/17#more-documentations-options
// https://www.digitalocean.com/community/tutorials/how-to-automate-your-node-js-production-deployments-with-shipit-on-centos-7
module.exports = shipit => {
require('shipit-deploy')(shipit)
shipit.initConfig({
default: {
workspace: '.',
deployTo: process.env.DEPLOY_SERVICE_PATH,
// The node_modules of packages are not sent since they've been bundled in the
// main server. The root node_modules is still needed for starting the app.
ignores: ['.git'],
keepReleases: 3,
// The workspace dir won't be removed after deploy
keepWorkspace: true,
// Disable the setup of Git repository (fetch, pull, merge, submodules, etc.)
// because the current context is already up to date(CI/ CD)
shallowClone: false,
branch: 'HEAD',
copy: false,
},
production: {
servers: {
user: process.env.HOST_HK_1_USER,
host: process.env.HOST_HK_1_IP,
},
},
})
}