dy
v0.0.4
Published
another deploy tool
Downloads
25
Readme
DY
a simaple deploy tools inspired by mina
Useage
npm install dy -g
create your own dy config file
dy-init
read document and edit this config file
dy-init
to run your deploy commands
Folder structure
/var/www/test.com/ # The deploy_to path
|- releases/ # Holds releases, one subdir per release
| |- 1/
| |- 2/
| |- 3/
| '- ...
|- shared/ # Holds files shared between releases
| |- logs/ # Log files are usually stored here
| `- ...
'- current/ # A symlink to the current release in releases/
Document
set('appname', 'xxx')
set('username', 'web')
set('host', 'localhost')
set('port', 22)
set('deploy_folder', '/user/local/good/to/deploy')
task('setup', function(){
queue('cd ${deploy_folder}')
queue('pwd .')
})
//another task
task('deploy', function(){
queue('pwd .')
queue('pwd .')
})
task('stop', function(){
queue('killall node')
})
//subtask inside
task('restart',function(){
invoke('stop')
invoke('deploy')
})
Default set
set('deploy_to', '/var/www/test.me')
//default settings
set('releases_path', 'releases')
set('shared_path', 'shared')
set('current_path', 'current')
set('lock_file', 'deploy.lock')
set('keep_releases', 5)
CLI
dy # run dy.js deploy task
dy sometask # run dy.js 'sometask' task
dy -f xx.js deploy # run xx.js deploy task
dy -f xx.js -v deploy # run xx.js deploy task and show detail
Options
-v
/--verbose
: show detail, default is off.-f FILE
/--file
: use custom dy.js configuration.-S
/--simulate
: output build scripts. TODO
Tasks
dy tasks
: show all aviable tasks
Variablse
dy NODE_ENV=production
: set NODE_ENV
to production