navy-clock-build
v0.0.4
Published
Navy Order to build a Clock project for deployment
Downloads
4
Readme
Clock Build Order
This is an Order which is used by Captains as part of the Navy deployment suite.
It does the following actions:
- Copy prepare directory to application specfic subdirectory of the build directory
- Run npm run-script build inside the application subdirectory
- Clean up the application subdirectory of any non application files
- Issue an 'rsync' order to other Captains
This order assumes that the following configuration keys have been added to the Admiral for the application you are trying to build:
- prepareDir: Directory where the application has been cloned and prepared for build
- buildDir: Directory into which the prepareDir should be copied. The directory specific to your application will be a subdirectory of this directory
An example Admiral application configuration might look like:
{ "name": "My Application"
, "appId": "myApp"
, "prepareDir": "/tmp/my-application-prepare-dir"
, "buildDir": "/var/application"
}
This order assumes that the following config options have been set on your Captains that will run this order
- externalIpAddress: ipAddress of the Captain running this order. This should be able to be used to access the Captain running this order, from other Captains
An example Captain config file might look like:
module.exports = function () {
var config =
{ name: 'captain-one'
, applications: { exampleAppId: [ 'staging', 'production' ] }
, admiral: { host: 'http://127.0.0.1', port: 8006 }
, orderDir: __dirname + '/orders'
, orders:
{ 'navy-clock-build': { command: 'build', config: { externalIpAddress: '10.0.0.1' } }
}
}
return config
}