Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[docs] cover deploy #97 #89 fixes #63

  • Loading branch information...
commit 597e3aec9647424f317a04763eac08086524bf0f 1 parent cda9194
@Swaagie Swaagie authored
View
17 content/a-quickstart/faq.md
@@ -254,4 +254,21 @@ more drones to fit your needs.
We always provision a new virtual machine. The old one gets decommissioned if
and only if everything went ok, so a failed deploy does not equate to down time.
+---
+
+## Why is the subdirectory or its content not deployed to Nodejitsu?
+
+Execute `npm pack` inside your application and make sure that the resulting
+package includes the file. Nodejitsu uses the same command when deploying
+your app.
+
+In case it is not included in the package, you should look into your
+`gitignore` and/or `.npmignore` files to ensure that the folder or
+contained files are not ignored. Note that any files/folders starting with
+`.` like `.DS_Store` are ignored by default and some special ones like `.git`
+cannot be unignored since npm prevents that.
+
+To explicitly unignore a file use `!filename` inside either `.gitignore` or
+`.npmignore`.
+
[meta:title]: <> (FAQ)
View
8 content/jitsu/conf.md
@@ -1 +1,9 @@
+# Configuring Jitsu
+
+Also include temporary flags here, like --release
+
+## Flags
+
+### Release
+
[meta:title]: <> (Configuration)
View
94 content/jitsu/deploy.md
@@ -1 +1,95 @@
+# Deploying your application
+
+Deploying your application is easy, it should only take a few seconds.
+`jitsu deploy` can be executed from the root of the application. This is where
+the *package.json* is located. Deployment will iterate through the following
+steps.
+
+1. Creates the application (if necessary)
+2. Creates or validates the package.json
+3. Packages and creates a new snapshot
+4. Stops the application (if necessary)
+5. Starts the application
+
+If you deploy for the first time, you'll be prompted for a subdomain and
+confirm the changes to [package.json][package]. By default your username will be
+prepended before the application name. After a succesful deploy `Nodejitsu ok`
+will be returned.
+
+```
+info: Welcome to Nodejitsu [user]
+info: jitsu v0.12.8, node v0.8.22
+info: It worked if it ends with Nodejitsu ok
+info: Executing command deploy
+warn:
+warn: The package.json file is missing required fields:
+warn:
+warn: Subdomain name
+warn:
+warn: Prompting user for required fields.
+warn: Press ^C at any time to quit.
+warn:
+prompt: Subdomain name: (subdomain)
+warn: About to write /var/www/test/helloworld/package.json
+...
+prompt: Is this ok?: (yes)
+info: Skipping require-analyzer because noanalyze option is set
+info: Checking app availability nodeapps-helloworld
+info: Creating app nodeapps-helloworld
+info: Creating snapshot 0.2.2
+info: Uploading: [=============================] 100%
+info: Updating app nodeapps-helloworld
+info: Activating snapshot 0.2.2 for nodeapps-helloworld
+info: Starting app nodeapps-helloworld
+info: App nodeapps-helloworld is now started
+info: http://subdomain.nodejitsu.com on Port 80
+info: Nodejitsu ok
+```
+## Repeated deployments
+
+After an initial deploy you can redeploy as often as you would like. Note
+however that `jitsu` will ask to increase the package build version, e.g the
+`x` in `0.0.z-x` will be incremented. A manual increase of the patch `z`
+version will skip the step below and immediatly deploy your application.
+
+```
+info: Welcome to Nodejitsu [user]
+info: jitsu v0.12.8, node v0.8.22
+info: It worked if it ends with Nodejitsu ok
+info: Executing command apps deploy
+info: Skipping require-analyzer because noanalyze option is set
+info: Skipping require-analyzer because noanalyze option is set
+warn: Local package version appears to be old
+warn: The package.json version will be incremented automatically
+warn: About to write /var/www/test/helloworld/package.json
+...
+data: version: '0.2.2-1',
+...
+prompt: Is this ok?: (yes)
+```
+
+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].
+
+## Continuous integration
+
+Nodejitsu also supports continuous integration (CI) for deployments. For more
+information about CI check the [getting started page][gettingstarted] or
+relevant [handbook section][handbook].
+
+## What is deployed
+
+Deploy will normally include all files, excluding the *node_modules* directory.
+The content that is deployed is dependant on `npm pack`. This command is
+executed by `jitsu deploy` and governs the snapshots we use for deployment.
+`npm pack` by default ignores files and folders starting with an dot, e.g.
+*.DS_Store*. In addition, it also takes *.gitignore* and *.npmignore* into
+account. More information about this subject can be found in the [FAQ][faq].
+
+[release]: /jitsu/config/#release
+[faq]: /a-quickstart/faq/#why-is-the-subdirectory-or-its-content-not-deployed-to-nodejitsu
+[handbook]: /features/webhooks/
+[gettingstarted]: https://www.nodejitsu.com/getting-started-with-github/
+[package]: /appendix/package-json/
[meta:title]: <> (Deploying apps)
Please sign in to comment.
Something went wrong with that request. Please try again.