Skip to content

Commit

Permalink
Merge pull request #21 from webcast-io/heroku-button-deploy
Browse files Browse the repository at this point in the history
Heroku One Click Deploy
  • Loading branch information
bencevans committed Nov 3, 2014
2 parents 52503b4 + f8e90d7 commit 66ce698
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ Run using CLI (with a path to a config file)
Run using CLI (with a default/example config)

$ jobukyu --default-config

Deployment
----------

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)

18 changes: 18 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Jobukyu",
"description": "Job Queue Server",
"keywords": [
"Job",
"Task",
"Queue"
],
"website": "https://github.com/webcast-io/jobukyu",
"repository": "https://github.com/webcast-io/jobukyu",
"success_url": "/",
"addons": [
"mongohq"
],
"env": {
"DEFAULT_CONFIG": "1"
}
}
2 changes: 1 addition & 1 deletion bin/jobukyu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var createApp = require('../index');

var configPath, config;

if(argv['default-config']) {
if(argv['default-config'] || process.env.DEFAULT_CONFIG) {
configPath = __dirname + '/../config.example.js';
} else {
configPath = argv.config || './config';
Expand Down
12 changes: 11 additions & 1 deletion config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,14 @@ var env = process.env.NODE_ENV || 'development';

// Expose the public API
//
module.exports = config[env];
module.exports = config[env];

// Overwrite for Heroku Instances

if(process.env.MONGOHQ_URL) {
module.exports.mongo.url = process.env.MONGOHQ_URL;
}

if(process.env.PORT) {
module.exports.port = process.env.PORT;
}

0 comments on commit 66ce698

Please sign in to comment.