Skip to content

Commit

Permalink
Merge branch 'master' into instrument-realtime-events
Browse files Browse the repository at this point in the history
  • Loading branch information
iamigo committed Jun 16, 2017
2 parents 0140b4b + d9591c5 commit 080ee96
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
@@ -0,0 +1,4 @@
.dockerignore
Dockerfile
docker-compose.yml
.git
19 changes: 19 additions & 0 deletions Dockerfile
@@ -0,0 +1,19 @@
FROM node:6.10.3

RUN useradd -U -d /opt/refocus refocus
ENV HOME=/opt/refocus
COPY . $HOME
RUN chown -R refocus:refocus $HOME

USER refocus
WORKDIR $HOME
RUN npm install

# sleep is to support pause during startup for deploys in kubernetes - delays start of refocus container to let pg and redis containers to start within the same pod.
ENV SLEEP=0
ENV PGHOST=pg
ENV REDIS_URL=//redis:6379

EXPOSE 3000

CMD [ "/bin/sh", "-c", "sleep $SLEEP; npm start" ]
18 changes: 18 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,18 @@
version: '2'
services:
refocus-app:
build: .
ports:
- "3000:3000"
depends_on:
- "redis"
- "pg"
redis:
image: "redis:3.2.8"
expose:
- 6379
pg:
image: "postgres:9.6.2"
expose:
- 5432

1 change: 1 addition & 0 deletions docs/docs/01-quickstart.md
Expand Up @@ -83,6 +83,7 @@ You have two ways to deploy Refocus. Select the one that best meets your needs.

- I want [one-click Heroku deployment](./03-quickstartheroku.html)
- I want to [download and build and deploy locally](./04-quickstartlocal.html)
- I want to [run Refocus locally as docker container](./05-quickstartlocaldocker.html)

Refocus requires that both Redis and PostgreSQL are running. After Refocus is deployed, create an account and sign in.

Expand Down
12 changes: 12 additions & 0 deletions docs/docs/05-quickstartlocaldocker.md
@@ -0,0 +1,12 @@
---
layout: docs
title: Quick Start with Local Docker
---

# QuickStart with Local Docker
# Prerequisites
1. Install docker [docker-for-mac](https://docs.docker.com/docker-for-mac/install/).
# Start refocus with dependencies
1. Clone this git repository.
2. Run `cd refocus`.
3. Run `docker-compose up`

0 comments on commit 080ee96

Please sign in to comment.