From 0d14500d5d8b93204bb99baf34dc9de745ae645d Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Sat, 7 Nov 2020 09:26:17 -0500 Subject: [PATCH] feat: add production scripts and better `Dockerfile` Closes: #710 Signed-off-by: Jef LeCompte --- Dockerfile | 4 +++- package.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f44ae5..5d14fd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/package.json b/package.json index b4fbb54..d3fa6a4 100644 --- a/package.json +++ b/package.json @@ -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",