From 70ea55cc2c42499bbcc7a46db0030c2c428cafe5 Mon Sep 17 00:00:00 2001 From: Thomas Steinert Date: Fri, 23 Feb 2018 18:50:41 +0100 Subject: [PATCH] Add docker config. Make the application run as a docker container. This way a scrumblr instance can be deployed within seconds which is useful for on-demand setups like on meetups or presentation. --- .dockerignore | 2 ++ Dockerfile | 18 ++++++++++++++++++ README.markdown | 2 ++ docker-compose.yml | 17 +++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..63d337d4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +docker-compose.yml +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..61632bc1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:alpine +MAINTAINER moenka + +ENV SCRUMBLR_PORT="8080" +ENV SCRUMBLR_BASEURL="/" +ENV SCRUMBLR_REDIS_URL="redis://redis" +ENV SCRUMBLR_REDIS_PORT="6379" + +WORKDIR /srv/scrumblr +COPY . /srv/scrumblr + +RUN npm install + +ENTRYPOINT /usr/local/bin/node server.js \ + --port ${SCRUMBLR_PORT} \ + --baseurl ${SCRUMBLR_BASEURL} \ + --redis ${SCRUMBLR_REDIS_URL}:${SCRUMBLR_REDIS_PORT} + diff --git a/README.markdown b/README.markdown index 315cc3a1..2d31c183 100644 --- a/README.markdown +++ b/README.markdown @@ -20,6 +20,8 @@ use scrumblr if you'd like to use scrumblr go to [scrumblr.ca](http://scrumblr.ca). new boards are made simply by modifying the url to something unique. e.g. your team could use a shared board at: *http://scrumblr.ca/thisisoursecretboard23423242* +if you want to host a on-demand version for e.g. meetups or presentation you can run `docker-compose --build -d`. the application is then reachable via `localhost:7000`. + alternatively, you can follow the instructions below to setup scrumblr yourself. it is very simple -- it just uses redis and node.js. if you are a developer, please fork and submit changes/fixes. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..4f8a0f2c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +--- +version: '3' +services: + redis: + image: redis:alpine + volumes: + - 'redis:/data' + server: + build: ./ + image: scrumblr + links: + - redis + ports: + - '7000:8080' +volumes: + redis: +