A production ready Slackbot written with Hubot
10K+
A production ready Slackbot written with Hubot
A Slackbot token pre-configured for your team is required. Checkout the Slack docs for more information.
If you do not want to connect to the container and just want to run it, use daemon mode with -d:
(sudo) docker run -d \
-e HUBOT_SLACK_TOKEN=<token> \
-v /logs:/app/logs \
--name halbert jonfairbanks/halbert
The logs/ volume mount can be moved as you see fit, but is required if you want hubot-chatlog files to persist container updates, reboots, etc.
(sudo) docker run -it --name halbert jonfairbanks/halbert '/bin/bash'HUBOT_SLACK_TOKEN=<token> ./bin/hubotThe output of hubot startup and any console.log() within your scripts is directed to container logs and can be viewed within Docker.
(sudo) docker logs <container name>
Unless specifically disabled, halbert also maintains a chatlog for each channel it is invited to. These logs are stored in the path specified on container launch and can also be viewed within Slack using the chatlog command.
(sudo) docker stop halbert(sudo) docker rm halbert(sudo) docker ps -a(sudo) docker images(sudo) docker rmi jonfairbanks/halbertAdditional ENV variables can be passed when starting Docker with the -e flag and then accessed within scripts as process.env.ENV_VARIABLE_NAME
-e ENV_VARIABLE_NAME='My Variable'
Directories within the Docker container can be exposed to the local machine with the -v flag with parameter syntax of :.
-v /app/logs:/hubot/logs
-v /app/scripts:/hubot/scripts
Note: exposing the entire /app directory may cause a startup failure
Docker ports can be exposed to extend functionality, such as with webhooks, using the -p flag.
-p 8080:8080 (<External Port>:<Internal Docker Port>)
docker exec -it halbert npm install hubot-packagename --save
docker restart halbert
Be sure to replace 'hubot-packagename' with the desired package you wish to install. When NPM packages are installed with the name that begins with hubot-*, they will be automatically added to the external-scripts.json file.
Content type
Image
Digest
Size
217.2 MB
Last updated
about 5 years ago
docker pull jonfairbanks/halbert