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" 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"