From a073a746f26221534716e411812b4222ab65e1bf Mon Sep 17 00:00:00 2001 From: xphyr Date: Thu, 14 Sep 2023 13:33:15 -0400 Subject: [PATCH 1/2] changing CMD for Dockerfile to use node instead of npm to address issue #984 --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 4c3abfcc1..63cb59fbd 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -30,4 +30,4 @@ HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \ EXPOSE 4000 -CMD ["npm", "run", "start"] +CMD ["node", "build/index.js"] From 44d2a6c55315b1b5a3bbe7f1ef03c0fadbc677f8 Mon Sep 17 00:00:00 2001 From: xphyr Date: Thu, 14 Sep 2023 13:57:58 -0400 Subject: [PATCH 2/2] clearing npm cache to save space --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 63cb59fbd..06448ad91 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -17,7 +17,7 @@ WORKDIR /app ENV npm_config_cache /home/node/.npm COPY package*.json ./ -RUN npm ci --only-production +RUN npm ci --only-production && npm cache clean --force COPY --from=build /app .