Browse files

added deploy script

  • Loading branch information...
1 parent 87f35ea commit 04aaac510358d204db4cc87b49ae2c4c2e1af5c2 @paulbjensen paulbjensen committed Jun 26, 2011
Showing with 26 additions and 0 deletions.
  1. +26 −0 deploy.coffee
View
26 deploy.coffee
@@ -0,0 +1,26 @@
+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()

0 comments on commit 04aaac5

Please sign in to comment.