From 07453499828234a8d091429f43feb2b5aa1492cc Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 24 Apr 2025 09:04:22 -0400 Subject: [PATCH 1/3] health check --- Dockerfile | 5 ++++- Dockerfile.dev | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9818dc2..0469f43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ FROM node:21-alpine WORKDIR /home/node/app/rems-directory +ARG SERVER_PORT +ENV SERVER_PORT=$SERVER_PORT + COPY --chown=node:node . . RUN npm install EXPOSE 3323 -HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://localhost:33333/health || exit 1 +HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://localhost:${SERVER_PORT}/health || exit 1 CMD npm run dev \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 7ce1ce8..aa59dc5 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,10 +1,13 @@ FROM node:21-alpine WORKDIR /home/node/app/rems-directory +ARG SERVER_PORT +ENV SERVER_PORT=$SERVER_PORT + COPY --chown=node:node . . RUN npm install EXPOSE 3323 EXPOSE 3324 -HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://localhost:33333/health || exit 1 +HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://localhost:${SERVER_PORT}/health || exit 1 CMD ./dockerRunnerDev.sh \ No newline at end of file From e5d939096f7de0258cc291c51b8e65ccdb9d2c42 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 24 Apr 2025 09:18:25 -0400 Subject: [PATCH 2/3] health check update --- Dockerfile | 3 +++ Dockerfile.dev | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0469f43..1d3deaa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ WORKDIR /home/node/app/rems-directory ARG SERVER_PORT ENV SERVER_PORT=$SERVER_PORT +ARG SERVER_HOST +ENV SERVER_HOST=$SERVER_HOST + COPY --chown=node:node . . RUN npm install EXPOSE 3323 diff --git a/Dockerfile.dev b/Dockerfile.dev index aa59dc5..3193473 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -4,10 +4,13 @@ WORKDIR /home/node/app/rems-directory ARG SERVER_PORT ENV SERVER_PORT=$SERVER_PORT +ARG SERVER_HOST +ENV SERVER_HOST=$SERVER_HOST + COPY --chown=node:node . . RUN npm install EXPOSE 3323 EXPOSE 3324 -HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://localhost:${SERVER_PORT}/health || exit 1 +HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://${SERVER_HOST}:${SERVER_PORT}/health || exit 1 CMD ./dockerRunnerDev.sh \ No newline at end of file From fd609aaad32bd28f1c1573de5535f77f92f0d55f Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 24 Apr 2025 09:30:13 -0400 Subject: [PATCH 3/3] health check update --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1d3deaa..d5574fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,5 @@ COPY --chown=node:node . . RUN npm install EXPOSE 3323 -HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://localhost:${SERVER_PORT}/health || exit 1 +HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD wget --no-verbose --tries=1 --spider http://${SERVER_HOST}:${SERVER_PORT}/health || exit 1 CMD npm run dev \ No newline at end of file