Skip to content

Commit

Permalink
feat: add production scripts and better Dockerfile
Browse files Browse the repository at this point in the history
Closes: #710
Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
  • Loading branch information
jef committed Nov 7, 2020
1 parent 42ef7cf commit 0d14500
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ WORKDIR /app

COPY --from=builder /build/node_modules/ node_modules/
COPY --from=builder /build/build/ build/
COPY package.json package.json
COPY version.txt version.txt

CMD [ "node", "./build/index.js" ]
ENTRYPOINT ["npm", "run"]
CMD ["start:production"]
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"lint:fix": "xo --fix",
"start": "npm run build && node build/index.js",
"start:dev": "nodemon --config nodemon.json",
"test:notification": "npm run build && node build/__test__/notification-test.js"
"start:production": "node build/index.js",
"test:notification": "npm run build && node build/__test__/notification-test.js",
"test:notification:production": "node build/__test__/notification-test.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 0d14500

Please sign in to comment.