Skip to content
Browse files

dotcloud-ification

  • Loading branch information...
1 parent 7bf189f commit 5fee13d8bba81510bd4c1ce5a3acf2bb6e77ad59 @miyagawa committed
Showing with 28 additions and 0 deletions.
  1. +21 −0 bin/hubot-wrapper
  2. +4 −0 dotcloud.yml
  3. +3 −0 supervisord.conf
View
21 bin/hubot-wrapper
@@ -0,0 +1,21 @@
+#!/usr/bin/env coffee
+
+# --- CHANGE BELOW ---
+nick = 'hubotcloud'
+server = 'irc.freenode.org'
+rooms = '#change_this'
+# --- CHANGE ABOVE ---
+
+fs = require 'fs'
+json = fs.readFileSync('/home/dotcloud/environment.json')
+environment = JSON.parse(json)
+
+process.env.REDISTOGO_URL = environment.DOTCLOUD_REDIS_REDIS_URL
+process.env.HUBOT_IRC_SERVER = server
+process.env.HUBOT_IRC_ROOMS = rooms
+process.env.HUBOT_IRC_NICK = nick
+
+exec = require('child_process').execFile
+exec('/home/dotcloud/current/node_modules/.bin/coffee', [ 'bin/hubot', '-a', 'irc', '-n', nick ], { env: process.env })
+
+
View
4 dotcloud.yml
@@ -0,0 +1,4 @@
+robot:
+ type: nodejs
+redis:
+ type: redis
View
3 supervisord.conf
@@ -0,0 +1,3 @@
+[program:hubot]
+command = /home/dotcloud/current/node_modules/.bin/coffee bin/hubot-wrapper
+directory = /home/dotcloud/current

0 comments on commit 5fee13d

Please sign in to comment.
Something went wrong with that request. Please try again.