commit
236fcc960f
18
Dockerfile
18
Dockerfile
|
@ -1,15 +1,17 @@
|
||||||
FROM node:8-alpine
|
FROM node:10 AS builder
|
||||||
|
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
||||||
|
COPY package*.json /app/
|
||||||
|
WORKDIR /app
|
||||||
|
RUN npm install --production
|
||||||
|
|
||||||
RUN apk add --no-cache git
|
FROM node:10-slim
|
||||||
RUN addgroup -S -g 10001 app && adduser -S -D -G app -u 10001 app
|
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
||||||
COPY . /app
|
|
||||||
RUN chown -R app /app
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN mkdir static
|
COPY --chown=app:app --from=builder /app .
|
||||||
RUN npm install --production && npm cache clean --force
|
COPY --chown=app:app . .
|
||||||
|
|
||||||
ENV PORT=1443
|
ENV PORT=1443
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
CMD ["npm", "run", "prod"]
|
CMD ["node", "server/prod.js"]
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: 2.0
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:8
|
- image: circleci/node:10
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- ./dist
|
- ./dist
|
||||||
test:
|
test:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:8-browsers
|
- image: circleci/node:10-browsers
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"prepush": "npm test",
|
"prepush": "npm test",
|
||||||
"check": "nsp check",
|
"check": "npm audit",
|
||||||
"clean": "rimraf dist",
|
"clean": "rimraf dist",
|
||||||
"build": "npm run clean && webpack -p",
|
"build": "npm run clean && webpack -p",
|
||||||
"lint": "npm-run-all lint:*",
|
"lint": "npm-run-all lint:*",
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
"test:frontend": "cross-env NODE_ENV=development node test/frontend/runner.js && nyc report --reporter=html",
|
"test:frontend": "cross-env NODE_ENV=development node test/frontend/runner.js && nyc report --reporter=html",
|
||||||
"test-integration": "docker-compose up --abort-on-container-exit --exit-code-from integration-tests --build --remove-orphans --quiet-pull && docker-compose down",
|
"test-integration": "docker-compose up --abort-on-container-exit --exit-code-from integration-tests --build --remove-orphans --quiet-pull && docker-compose down",
|
||||||
"test-integration-stage": "cross-env BASE_URL=https://send.stage.mozaws.net npm run test-integration",
|
"test-integration-stage": "cross-env BASE_URL=https://send.stage.mozaws.net npm run test-integration",
|
||||||
"start": "npm run clean && cross-env NODE_ENV=development webpack-dev-server",
|
"start": "npm run clean && npm run build && npm run prod",
|
||||||
"prod": "node server/prod.js"
|
"prod": "node server/prod.js"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
@ -86,14 +86,13 @@
|
||||||
"nanobus": "^4.3.4",
|
"nanobus": "^4.3.4",
|
||||||
"nanotiming": "^7.3.1",
|
"nanotiming": "^7.3.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"nsp": "^3.2.1",
|
|
||||||
"nyc": "^11.9.0",
|
"nyc": "^11.9.0",
|
||||||
"postcss-cssnext": "^3.1.0",
|
"postcss-cssnext": "^3.1.0",
|
||||||
"postcss-import": "^11.1.0",
|
"postcss-import": "^11.1.0",
|
||||||
"postcss-loader": "^2.1.6",
|
"postcss-loader": "^2.1.6",
|
||||||
"prettier": "^1.15.2",
|
"prettier": "^1.15.2",
|
||||||
"proxyquire": "^1.8.0",
|
"proxyquire": "^1.8.0",
|
||||||
"puppeteer": "^1.10.0",
|
"puppeteer": "^1.11.0",
|
||||||
"raven-js": "^3.27.0",
|
"raven-js": "^3.27.0",
|
||||||
"redis-mock": "^0.21.0",
|
"redis-mock": "^0.21.0",
|
||||||
"require-from-string": "^2.0.2",
|
"require-from-string": "^2.0.2",
|
||||||
|
@ -109,7 +108,6 @@
|
||||||
"val-loader": "^1.1.1",
|
"val-loader": "^1.1.1",
|
||||||
"webpack": "^3.12.0",
|
"webpack": "^3.12.0",
|
||||||
"webpack-dev-middleware": "^2.0.6",
|
"webpack-dev-middleware": "^2.0.6",
|
||||||
"webpack-dev-server": "2.9.1",
|
|
||||||
"webpack-manifest-plugin": "^1.3.2",
|
"webpack-manifest-plugin": "^1.3.2",
|
||||||
"webpack-unassert-loader": "^1.2.0"
|
"webpack-unassert-loader": "^1.2.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,7 +23,12 @@ function onConsole(msg) {
|
||||||
|
|
||||||
const server = app.listen(async function() {
|
const server = app.listen(async function() {
|
||||||
let exitCode = -1;
|
let exitCode = -1;
|
||||||
const browser = await puppeteer.launch();
|
const browser = await puppeteer.launch({
|
||||||
|
args: [
|
||||||
|
// puppeteer >= 1.10.0 crashes on Circle CI without this flag set
|
||||||
|
'--no-sandbox'
|
||||||
|
]
|
||||||
|
});
|
||||||
try {
|
try {
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
page.on('console', onConsole);
|
page.on('console', onConsole);
|
||||||
|
|
Loading…
Reference in New Issue