Skip to content

Commit

Permalink
dotcloud-ification
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Oct 26, 2011
1 parent 7bf189f commit 5fee13d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/hubot-wrapper
Original file line number Diff line number Diff line change
@@ -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 })


4 changes: 4 additions & 0 deletions dotcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
robot:
type: nodejs
redis:
type: redis
3 changes: 3 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -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.