From 027ae26e39eea25eb6f20af1dfb36fc8fb2524cc Mon Sep 17 00:00:00 2001 From: Sujeet Agrahari Date: Sun, 25 Jun 2023 23:39:52 +0530 Subject: [PATCH] Fix docker build failure --- Dockerfile | 4 ++-- healthcheck.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0986a1..ff07018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM node:16-alpine AS base -ENV NODE_ENV=development +ENV NODE_ENV=production EXPOSE 3000 RUN npm install -g pnpm RUN mkdir /app && chown -R node:node /app @@ -20,4 +20,4 @@ RUN pnpm install --only=development CMD ["nodemon", "server.js"] FROM source as prod -CMD ["node", "server.js"] +CMD ["node", "src/server.js"] diff --git a/healthcheck.js b/healthcheck.js index 1bf7cfe..a98e118 100644 --- a/healthcheck.js +++ b/healthcheck.js @@ -17,7 +17,7 @@ const checkAppHealth = async () => { console.log('App is up and running'); // Additional actions if the app is healthy } else { - console.log('App is not healthy'); + console.error('App is not healthy'); // Additional actions if the app is not healthy } } catch (error) {