Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #103 from mozilla/docker
Browse files Browse the repository at this point in the history
added Dockerfile
  • Loading branch information
dannycoates committed Jun 21, 2017
2 parents 2bb0c7e + f7c1b17 commit 37f74ca
Show file tree
Hide file tree
Showing 8 changed files with 893 additions and 447 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
@@ -0,0 +1,4 @@
node_modules
.git
.DS_Store
static
11 changes: 11 additions & 0 deletions Dockerfile
@@ -0,0 +1,11 @@
FROM node:8-alpine

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

ENV PORT=1443
EXPOSE $PORT

CMD ["npm", "start"]
7 changes: 7 additions & 0 deletions circle.yml
Expand Up @@ -2,3 +2,10 @@ machine:
node:
version: 8.0.0

deployment:
latest:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker build . -t mozilla/portal:latest
- docker push mozilla/portal:latest
12 changes: 12 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,12 @@
version: "3"
services:
web:
build: .
links:
- redis
ports:
- "1443:1443"
environment:
- P2P_REDIS_HOST=redis
redis:
image: redis:alpine
10 changes: 10 additions & 0 deletions docs/docker.md
@@ -0,0 +1,10 @@
Environment Variables:

PORT - port the server will listen on (defaults to 1443)
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' mozilla/portal:latest

0 comments on commit 37f74ca

Please sign in to comment.