From ab194ed9154460d751fe96d1cd1aaf3cfb25b0dd Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 30 Apr 2014 11:04:43 -0700 Subject: [PATCH] hubot: Add jenrzzz/hubot-logger 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 | 11 ++++++++++- hubot/README.md | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hubot/Dockerfile.template b/hubot/Dockerfile.template index db7759f..8c44151 100644 --- a/hubot/Dockerfile.template +++ b/hubot/Dockerfile.template @@ -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 diff --git a/hubot/README.md b/hubot/README.md index e38a75b..bd68cc7 100644 --- a/hubot/README.md +++ b/hubot/README.md @@ -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 -- 2.26.2