Created
November 23, 2011 23:06
-
-
Save todoubled/1390200 to your computer and use it in GitHub Desktop.
Deployment script for Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
control = require 'control' | |
task = control.task | |
perform = control.perform | |
task 'staging', 'config got my server', -> | |
config = user: 'root' | |
addresses = ['socketchat.co.uk'] | |
return control.hosts(config, addresses) | |
task 'deploy', 'deploy the latest version of the app', (host) -> | |
host.ssh 'cd apps/socketchat/ && git pull origin master', -> | |
perform 'restart', host | |
task 'update_dependencies', 'upgrade socketstream', (host) -> | |
host.ssh 'cd downloads/socketstream/ && git pull origin master && sudo npm link', -> | |
task 'restart', 'restart the application', (host) -> | |
host.ssh 'sudo sh /etc/init.d/socketchat restart' | |
task 'stop', 'stop the application', (host) -> | |
host.ssh 'sudo sh /etc/init.d/socketchat stop' | |
task 'start', 'stop the application', (host) -> | |
host.ssh 'sudo sh /etc/init.d/socketchat start' | |
control.begin() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment