Skip to content

Commit

Permalink
added Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed Jun 20, 2017
1 parent 2bb0c7e commit 53f264e
Show file tree
Hide file tree
Showing 7 changed files with 902 additions and 446 deletions.
20 changes: 20 additions & 0 deletions .circleci/circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
jobs:
build:
working_directory: ~/app
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: npm-install
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- .node_modules
- run:
name: test
command: npm test
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.git
.DS_Store
static
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:8-alpine

COPY . /app
WORKDIR /app
RUN mkdir static
RUN npm install

EXPOSE 1443
CMD ["npm", "start"]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3"
services:
web:
build: .
links:
- redis
ports:
- "1443:1443"
environment:
- P2P_REDIS_HOST=redis
redis:
image: redis:alpine
9 changes: 9 additions & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Environment Variables:

P2P_S3_BUCKET - the S3 bucket name
P2P_REDIS_HOST - host name of the redis server
NODE_ENV - production

Example

docker run --net=host -e 'NODE_ENV=production' -e 'P2P_S3_BUCKET=testpilot-p2p-dev' -e 'P2P_REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com'
Loading

0 comments on commit 53f264e

Please sign in to comment.