Browse files

[docs] add hooks to deploy, fixes #89

  • Loading branch information...
1 parent 487c8de commit 94744ebadb415e080463f0c3fa7b0d7a9760ab0a @Swaagie Swaagie committed Apr 1, 2013
Showing with 43 additions and 0 deletions.
  1. +43 −0 content/jitsu/
43 content/jitsu/
@@ -72,6 +72,49 @@ You can also do `jitsu deploy --release patch` to force `jitsu deploy` to
increase the patch version number. For more fine-grained versioning control
see [jitsu config --release][release].
+## Hooks
+Applications can required certain tasks to be done for before or just after
+deployment. For these repetitive tasks we offer pre and post deploy hooks. Hooks
+are scripts that perform some required tasks before starting your application.
+Per example:
+ "name": "test-app",
+ "subdomain": "test-app",
+ "scripts": {
+ "predeploy": "echo This will be run before deploying the app",
+ "postdeploy": "echo This will be run after deploying the app",
+ "start": "app.js"
+ },
+ "engines": {
+ "node": "0.6.x"
+ },
+ "version": "0.0.0"
+Deploying an application with these deploy hooks, would result in:
+info: Welcome to Nodejitsu
+info: It worked if it ends with Nodejitsu ok
+info: Executing command deploy
+info: Analyzing your application dependencies in app.js
+info: Checking app availability test-app
+info: Creating app test-app
+This will be run before deploying the app
+info: Creating snapshot 0.0.0
+info: Updating app test-app
+info: Activating snapshot 0.0.0 for test-app
+info: Starting app test-app
+info: App test-app is now started
+info: on Port 80
+This will be run after deploying the app
+info: Nodejitsu ok
## Continuous integration
Nodejitsu also supports continuous integration (CI) for deployments. For more

0 comments on commit 94744eb

Please sign in to comment.