Skip to content

Commit

Permalink
Fix Docker build (#2815)
Browse files Browse the repository at this point in the history
Close #2814
  • Loading branch information
paulmelnikow authored Jan 20, 2019
1 parent 7789e80 commit a8e27d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ WORKDIR /usr/src/app

ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
COPY package.json /usr/src/app/

COPY package.json package-lock.json /usr/src/app/
# Without the gh-badges package.json and CLI script in place, `npm install` will fail.
COPY gh-badges /usr/src/app/gh-badges/
RUN npm install

COPY . /usr/src/app
RUN npm run build
RUN npm prune --production
RUN npm cache clean --force

# Do we need to list the environment variables here?
node server
CMD node server

EXPOSE 80
5 changes: 1 addition & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@
"glob": "^7.1.1",
"joi": "14.3.1",
"js-yaml": "^3.12.1",
"joi-extension-semver": "2.0.0",
"jsonpath": "~1.0.0",
"lodash.countby": "^4.6.0",
"lodash.mapkeys": "^4.6.0",
"lodash.throttle": "^4.1.1",
"lodash.times": "^4.3.2",
"moment": "^2.23.0",
"node-env-flag": "^0.1.0",
"parse-link-header": "^1.0.1",
"path-to-regexp": "^3.0.0",
"pretty-bytes": "^5.0.0",
"priorityqueuejs": "^1.0.0",
Expand Down Expand Up @@ -160,7 +162,6 @@
"icedfrisby-nock": "^1.1.0",
"is-png": "^1.1.0",
"is-svg": "^3.0.0",
"joi-extension-semver": "2.0.0",
"js-yaml-loader": "^1.0.1",
"lint-staged": "^8.1.0",
"lodash.debounce": "^4.0.8",
Expand All @@ -180,7 +181,6 @@
"npm-run-all": "^4.1.5",
"nyc": "^13.0.1",
"opn-cli": "^4.0.0",
"parse-link-header": "^1.0.1",
"portfinder": "^1.0.20",
"prettier": "1.15.3",
"prettier-check": "^2.0.0",
Expand Down

0 comments on commit a8e27d1

Please sign in to comment.