Browse Source

Merge pull request #53 from bjorand/docker

Add Docker support
JeongHoon Byun (aka Outsider) 8 years ago
parent
commit
b83135c5ee
3 changed files with 21 additions and 1 deletions
  1. 9 0
      Dockerfile
  2. 11 0
      README.md
  3. 1 1
      bin/www

+ 9 - 0
Dockerfile

@@ -0,0 +1,9 @@
+FROM node:onbuild
+MAINTAINER Benjamin Jorand <benjamin.jorand@gmail.com>
+
+EXPOSE 3000
+
+COPY . /slack-invite-automation
+WORKDIR /slack-invite-automation
+RUN npm install
+CMD ./bin/www

+ 11 - 0
README.md

@@ -43,3 +43,14 @@ $ bin/www
 You can access <http://localhost:3000> on your web browser.
 
 ![](https://raw.github.com/outsideris/slack-invite-automation/master/screenshots/join-page.jpg)
+
+## Run with Docker
+
+It's easy to run this service if you have installed Docker on your system.
+
+```shell
+$ git clone git@github.com:outsideris/slack-invite-automation.git
+$ cd slack-invite-automation
+$ docker build -t slack-invite-automation .
+$ docker run -it --rm -e COMMUNITY_NAME="YOUR-TEAM-NAME" -e SLACK_URL="YOUR-TEAM.slack.com" -e SLACK_TOKEN="YOUR-ACCESS-TOKEN" -p 3000:3000 slack-invite-automation
+```

+ 1 - 1
bin/www

@@ -25,7 +25,7 @@ var server = http.createServer(app);
  * Listen on provided port, on all network interfaces.
  */
 
-server.listen(port);
+server.listen(port, '0.0.0.0');
 server.on('error', onError);
 server.on('listening', onListening);