grunt-ssh-deploy-release
Deploy releases over SSH with rsync or gzip archive.
/deployPath
|
├── www --> symlink to ./releases/<currentRelease>
|
├── releases
| ├── 2017-02-08-17-14-21-867-UTC
| ├── ...
| └── 2017-02-09-18-01-10-765-UTC
| ├── ...
| └── logs --> symlink to shared/logs
|
└── shared
└── logs
Installation
npm install grunt-ssh-deploy-release
Grunt configuration
grunt.config.set('ssh-deploy-release', {
options: {
localPath: 'www',
exclude: [
'tmp/**',
'images/**',
],
share: {
'images': 'assets/images',
'upload': {
symlink: 'app/upload',
mode: '777',
},
},
create: [
'tmp',
'logs'
],
makeWritable: [
'test',
'foo'
]
},
preproduction: {
options: {
host: 'hostname',
username: 'username',
password: 'password',
deployPath: '/opt/path/to'
}
},
production: {
options: {
host: 'hostname',
username: 'username',
password: 'password',
deployPath: '/opt/path/to'
}
}
});
Execute
Deploy to "environmentName"
grunt ssh-deploy-release:environmentName
Remove release
grunt ssh-deploy-release:environmentName --remove
See allowRemove option on ssh-deploy-release.
Enable debug
Set debug option to true
Options
grunt-ssh-deploy-release use ssh-deploy-release package.
See available options on https://github.com/la-haute-societe/ssh-deploy-release