Merge branch 'master' into ui
This commit is contained in:
commit
0015b3c0c6
|
@ -0,0 +1,4 @@
|
||||||
|
node_modules
|
||||||
|
.git
|
||||||
|
.DS_Store
|
||||||
|
static
|
|
@ -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:
|
node:
|
||||||
version: 8.0.0
|
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
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
ports:
|
||||||
|
- "1443:1443"
|
||||||
|
environment:
|
||||||
|
- P2P_REDIS_HOST=redis
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
|
@ -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
|
File diff suppressed because it is too large
Load Diff
|
@ -49,7 +49,7 @@
|
||||||
"lint:css": "stylelint 'public/*.css'",
|
"lint:css": "stylelint 'public/*.css'",
|
||||||
"lint:html": "htmllint 'views/*.handlebars'",
|
"lint:html": "htmllint 'views/*.handlebars'",
|
||||||
"lint:js": "eslint .",
|
"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"
|
"test": "mocha"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ const conf = convict({
|
||||||
format: 'port',
|
format: 'port',
|
||||||
default: 1443,
|
default: 1443,
|
||||||
arg: 'port',
|
arg: 'port',
|
||||||
env: 'P2P_LISTEN_PORT'
|
env: 'PORT'
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
format: ['production', 'development', 'test'],
|
format: ['production', 'development', 'test'],
|
||||||
|
|
Loading…
Reference in New Issue