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
|
||||
RUN addgroup -S -g 10001 app && adduser -S -D -G app -u 10001 app
|
||||
COPY . /app
|
||||
RUN chown -R app /app
|
||||
FROM node:10-slim
|
||||
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
||||
USER app
|
||||
WORKDIR /app
|
||||
RUN mkdir static
|
||||
RUN npm install --production && npm cache clean --force
|
||||
COPY --chown=app:app --from=builder /app .
|
||||
COPY --chown=app:app . .
|
||||
|
||||
ENV PORT=1443
|
||||
EXPOSE $PORT
|
||||
|
||||
CMD ["npm", "run", "prod"]
|
||||
CMD ["node", "server/prod.js"]
|
||||
|
@ -2,7 +2,7 @@ version: 2.0
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
- image: circleci/node:10
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
@ -19,7 +19,7 @@ jobs:
|
||||
- ./dist
|
||||
test:
|
||||
docker:
|
||||
- image: circleci/node:8-browsers
|
||||
- image: circleci/node:10-browsers
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
1157
package-lock.json
generated
1157
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@
|
||||
"scripts": {
|
||||
"precommit": "lint-staged",
|
||||
"prepush": "npm test",
|
||||
"check": "nsp check",
|
||||
"check": "npm audit",
|
||||
"clean": "rimraf dist",
|
||||
"build": "npm run clean && webpack -p",
|
||||
"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-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",
|
||||
"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"
|
||||
},
|
||||
"lint-staged": {
|
||||
@ -86,14 +86,13 @@
|
||||
"nanobus": "^4.3.4",
|
||||
"nanotiming": "^7.3.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"nsp": "^3.2.1",
|
||||
"nyc": "^11.9.0",
|
||||
"postcss-cssnext": "^3.1.0",
|
||||
"postcss-import": "^11.1.0",
|
||||
"postcss-loader": "^2.1.6",
|
||||
"prettier": "^1.15.2",
|
||||
"proxyquire": "^1.8.0",
|
||||
"puppeteer": "^1.10.0",
|
||||
"puppeteer": "^1.11.0",
|
||||
"raven-js": "^3.27.0",
|
||||
"redis-mock": "^0.21.0",
|
||||
"require-from-string": "^2.0.2",
|
||||
@ -109,7 +108,6 @@
|
||||
"val-loader": "^1.1.1",
|
||||
"webpack": "^3.12.0",
|
||||
"webpack-dev-middleware": "^2.0.6",
|
||||
"webpack-dev-server": "2.9.1",
|
||||
"webpack-manifest-plugin": "^1.3.2",
|
||||
"webpack-unassert-loader": "^1.2.0"
|
||||
},
|
||||
|
@ -23,7 +23,12 @@ function onConsole(msg) {
|
||||
|
||||
const server = app.listen(async function() {
|
||||
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 {
|
||||
const page = await browser.newPage();
|
||||
page.on('console', onConsole);
|
||||
|
Loading…
Reference in New Issue
Block a user