Server deploy tool, supports deployments from a web interface and through GitHub webhooks.
There are currently two ways to make chewie deploy a project. By a status event hook from GitHub, from which a success status on master will make it deploy the master branch, and by using the web frontend.
git clone git@github.com:webkom/chewie.git
cd chewie
npm install
forever start $PWD/index.js
This will get the project up and running on port 3000 or the port specified in the PORT
environment variable.
There has to be a JSON-file with descriptions of the projects you want to deploy.
chewie will look for it on the location specified by the environment variable:
SERVER_CONFIG_FILE
. The file should use the following format:
{
"<repo-name-from-github>": {
"hostname": "<hostname-of-server-the-project-runs-on>",
"user": "<ssh-user>",
"path": "<path-to-project-on-the-server>"
},
"<another-repo>": {
...
8000
}
}
The user running chewie needs to have ssh access to the user on the server each project runs on.
If you want to deploy chewie on a server with another hostname than <server>.abakus.no
expose
the CORRECT_HOSTNAME
environment variable in order to run make production
.
All projects must have a production
target in make. chewie will run
make production
in the given path on the given server. Thus, the target
must contain all tasks to successfully deploy the project. Except
git fetch && git reset --hard origin/master
which will run before
make production
in order to make sure that the latest makefile is available.
make test
All settings should be set by environment variables.
The port the express web-server will listen to.
Default: 'development'
The environment chewie is running in. This should be set to production
in production.
The config file with projects, mentioned in the setup section
The secret token used to authenticate github webhooks.
The strategy passport should use to authenticate. This will be passed into require and the required file will be called like a function and passed into passport. passport-abakus is an example of a passport strategy that comply with the structure chewie expects.
Note: If this is not set chewie will not require authentication for the deployment dashboard.
Default: {}
The options passed into the passport strategy
Default: false
Should redis dependent features be used.
Default: 6379
Default: '127.0.0.1'
Default: 1
Used to enable sending of slack notification on deployments.
The channel to send notifications to
Default: abakus.no
Only used by the makefile to make sure make production
only runs in the right environment.
MIT © webkom, Abakus Linjeforening