hubot: Add jenrzzz/hubot-logger
authorW. Trevor King <wking@tremily.us>
Wed, 30 Apr 2014 18:04:43 +0000 (11:04 -0700)
committerW. Trevor King <wking@tremily.us>
Wed, 30 Apr 2014 18:23:12 +0000 (11:23 -0700)
This logger is not in the node index (which points to
adragomir/hubot-logger [1,2]).  However, Jenner's package has more
recent activity (one month ago, vs. five for Andrei), and seems more
featureful.  I also approve of using Redis (instead of on-disk files)
for log storage.

[1]: https://www.npmjs.org/package/hubot-logger
[2]: https://github.com/adragomir/hubot-logger

hubot/Dockerfile.template
hubot/README.md

index db7759f1d7dd2cca2e0bf21f0a20cee0fb5aa2a8..8c4415194a7296210559e89d1588401982174d9c 100644 (file)
@@ -52,9 +52,18 @@ RUN sed -i 's/\]$/,\n "github-pull-request-notifier.coffee"]/' hubot/hubot-scrip
 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "url": "",/' hubot/package.json
 #RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "querystring": "",/' hubot/package.json
 
+RUN sed -i 's/\]$/,\n "logger.coffee"]/' hubot/hubot-scripts.json
+#RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "redis": ">=0.7.2",/' hubot/package.json
+RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "moment": ">=1.7.0",/' hubot/package.json
+RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "connect": ">=2.4.5",/' hubot/package.json
+RUN sed -i 's/\([[:space:]]*\)\("dependencies": {\)/\1\2\n\1  "connect_router": "*",/' hubot/package.json
+
 RUN cd hubot && npm install
+RUN git clone git://github.com/jenrzzz/hubot-logger.git && cp hubot-logger/logger.coffee hubot/node_modules/hubot-scripts/src/scripts/
 
 # Container networking happens automatically
 RUN sed -i 's/need net$/use net/' /etc/init.d/*
 
-CMD cd hubot && REDISCLOUD_URL="${REDIS_PORT}" exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc
+CMD cd hubot && REDISCLOUD_URL="${REDIS_PORT}" LOG_REDIS_URL="${REDIS_PORT}" PORT=80 exec bin/hubot --name "${HUBOT_IRC_NICK:-hubot}" -a irc
+EXPOSE 80
+EXPOSE 8000
index e38a75b459d9f3d580bf9238d04d660df87f28b9..bd68cc7315cbc0cb1eca83477d32d9727850cd04 100644 (file)
@@ -6,6 +6,7 @@ number of [scripts][] installed out of the box:
 * [github-issue-link][]
 * [github-issues][]
 * [github-pull-request-notifier][]
+* [github-logger][]
 
 It's also easy to [write your own scripts][scripting].
 
@@ -20,7 +21,12 @@ Run this [hubot][] image with:
     >   -e HUBOT_IRC_UNFLOOD="200" \
     >   -e HUBOT_GITHUB_USER="github" \
     >   -e HUBOT_GITHUB_REPO="github/hubot" \
+    >   -e LOG_HTTP_USER="logs" \
+    >   -e LOG_HTTP_PASS="changme" \
+    >   -e LOG_HTTP_PORT=8000" \
     >   --link redis-0:redis \
+    >   -p 80:80 \
+    >   -p 8000:8000 \
     >   wking/hubot
 
 If your IRC server requires a server-wide password, you can set
@@ -45,6 +51,7 @@ with `HUBOT_LOG_LEVEL=debug` (see [robot.coffee][]).
 [github-issue-link]: https://github.com/github/hubot-scripts/blob/master/src/scripts/github-issue-link.coffee
 [github-issues]: https://github.com/github/hubot-scripts/blob/master/src/scripts/github-issues.coffee
 [github-pull-request-notifier]: https://github.com/github/hubot-scripts/blob/master/src/scripts/github-pull-request-notifier.coffee
+[github-logger]: https://github.com/jenrzzz/hubot-logger
 [scripting]: https://github.com/github/hubot/blob/master/docs/scripting.md
 [link]: http://docs.docker.io/en/latest/use/port_redirection/#linking-a-container
 [redis-brain]: https://github.com/github/hubot-scripts/blob/master/src/scripts/redis-brain.coffee