Merge branch 'master' into ui
This commit is contained in:
commit
0015b3c0c6
8 changed files with 893 additions and 447 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
@ -0,0 +1,4 @@
|
|||
node_modules
|
||||
.git
|
||||
.DS_Store
|
||||
static
|
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
@ -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"]
|
|
@ -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
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: "3"
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
links:
|
||||
- redis
|
||||
ports:
|
||||
- "1443:1443"
|
||||
environment:
|
||||
- P2P_REDIS_HOST=redis
|
||||
redis:
|
||||
image: redis:alpine
|
10
docs/docker.md
Normal file
10
docs/docker.md
Normal file
|
@ -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
|
1266
package-lock.json
generated
1266
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -49,7 +49,7 @@
|
|||
"lint:css": "stylelint 'public/*.css'",
|
||||
"lint:html": "htmllint 'views/*.handlebars'",
|
||||
"lint:js": "eslint .",
|
||||
"start": "watchify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js",
|
||||
"start": "browserify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js",
|
||||
"test": "mocha"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ const conf = convict({
|
|||
format: 'port',
|
||||
default: 1443,
|
||||
arg: 'port',
|
||||
env: 'P2P_LISTEN_PORT'
|
||||
env: 'PORT'
|
||||
},
|
||||
env: {
|
||||
format: ['production', 'development', 'test'],
|
||||
|
|
Loading…
Reference in a new issue