From 9e4bffa747f012a4c747d976dc33d5736c4513cc Mon Sep 17 00:00:00 2001 From: acrewdson Date: Fri, 27 Oct 2017 17:53:22 -0400 Subject: [PATCH 1/2] :neckbeard: --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 5356aae..a8cb6e4 100755 --- a/start.sh +++ b/start.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ENV_FILE="./.env" ENV_PRIVATE_FILE="./.env_private" From 89a10a1b840d243d5652c70e61e558c06518c4c3 Mon Sep 17 00:00:00 2001 From: acrewdson Date: Fri, 27 Oct 2017 17:55:37 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++++ README.md | 11 ++++++++++- docker-compose.yml | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2199aa8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM node:latest +ADD . /app +WORKDIR /app +ENTRYPOINT ["npm", "start"] diff --git a/README.md b/README.md index 45962f4..b1b56c1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ CFPB's internal chat bot built on [Hubot](http://hubot.github.com). -## Installation +## Installation (Docker-less) 1. Install [Node.js](https://nodejs.org) (v4 or greater). 1. Install and start [Redis](http://redis.io/). @@ -13,6 +13,15 @@ CFPB's internal chat bot built on [Hubot](http://hubot.github.com). See [INSTALL](INSTALL.md) for complete installation steps. +## Installation using Docker + +1. Clone this repo. +1. `cp .env.sample .env` +1. Add `export REDIS_URL="redis://redis:6379"` to the end of `.env` +1. Add or modify any other settings in `.env` +1. Run `docker-compose up -d` +1. Run `docker-compose run cfpbot start` + ## Contributing **IMPORTANT:** All git commits to this repo should have messages consisting of a single [emoji code](http://www.emoji-cheat-sheet.com/). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d5fcdd9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +--- +version: '3' +services: + cfpbot: + build: . + volumes: + - .:/app + redis: + image: "redis:latest"