Skip to content

Instantly share code, notes, and snippets.

@maxdeviant
Last active August 29, 2015 14:07
Show Gist options
  • Save maxdeviant/2e3e306030daedc26c2b to your computer and use it in GitHub Desktop.
Save maxdeviant/2e3e306030daedc26c2b to your computer and use it in GitHub Desktop.

If you chose to run shout as public with no user login,
all you need to do is build the image and start it...

If you chose to run shout in private mode, follow these steps...

mkdir -p ./users/<username>
nano ./users/<username>/user.json

copy the content of users/example/user.json into the new user.json file. edit the content to your likings.

{
    "user": "example",
    "password": "password",
    "networks": [{
        "name": "Freenode",
        "host": "irc.freenode.net",
        "port": 6697,
        "tls": true,
        "password": "serverpw",
        "nick": "john",
        "realname": "John Doe",
        "commands": [
            "/msg NickServ identify password",
            "/msg ChanServ op #chan"
        ],
        "join": "#foo, #bar"
    }]
}

And you are done, build the docker image and run it!

{
"debug": false,
"port": 9000,
"theme": "themes/example.css",
"public": false
}
# get latest node.js image
FROM node:latest
# set user root
USER root
# install shout
RUN npm install -g shout
# copy server config
# NOTE: you can skip this step if you want shout to be public, and require no user login
RUN rm /usr/local/lib/node_modules/shout/config.json
COPY ./config.json /usr/local/lib/node_modules/shout/config.json
# create user
RUN useradd -m -d /home/shout -p shout shout
# set HOME env
ENV HOME /home/shout
# set user shout
USER shout
# add users to shout's folder in home
# NOTE: you can skip this step if you want shout to be public, and require no user login
COPY ./users/<username>/user.json /home/shout/.shout/users/<username>/user.json
# expose server port
EXPOSE 9000
# entrypoint is shout, to start the shout server...
ENTRYPOINT shout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment