From 7ef6ebb076fa60b170d7844dd28a356b0fb9b544 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 6 Dec 2024 18:18:17 +0000 Subject: [PATCH] Docker runs the app in production. --- Dockerfile | 2 +- package.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d9e0dbf..477b851 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,4 @@ COPY . . EXPOSE ${WEB_PORT} -CMD [ "node", "app.js" ] \ No newline at end of file +CMD ["npm", "run", "start"] \ No newline at end of file diff --git a/package.json b/package.json index cda9fb1..97a623f 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,8 @@ "version": "0.0.0", "main": "app.js", "scripts": { + "start": "NODE_ENV=production node app.js", + "dev": "NODE_ENV=development node app.js", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "",