Created
February 4, 2015 03:09
-
-
Save timkelty/92af884f3e6163c6c48e to your computer and use it in GitHub Desktop.
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
var imageName, containerName; | |
var pull = function pull() { | |
return shipit.remote("docker pull " + imageName); | |
}; | |
var rm = function rm() { | |
return shipit.remote("docker rm -f " + containerName + " || true"); | |
}; | |
var run = function run() { | |
return shipit.remote("docker run -d -p 11000:11000 --name " + containerName + " " + imageName); | |
}; | |
shipit.task("deploy", function() { | |
return pull() | |
.then(rm) | |
.then(run) | |
.then(function () { | |
shipit.log('Done!'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment