From 1a80932a085a545b86e9fd41179caa719db97539 Mon Sep 17 00:00:00 2001 From: upmcplanetracker <219436948+upmcplanetracker@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:50:07 -0400 Subject: [PATCH] Update Dockerfile for nginx configuration and healthcheck --- Dockerfile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 899257b..6655ba4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,8 +23,8 @@ ENV PUB_DISABLE_FAILURE_BLOCKS=${PUB_DISABLE_FAILURE_BLOCKS} COPY package.json ./ RUN apt-get update && \ - apt-get install -y --no-install-recommends git && \ - rm -rf /var/lib/apt/lists/* + apt-get install -y --no-install-recommends git && \ + rm -rf /var/lib/apt/lists/* RUN bun install @@ -34,11 +34,18 @@ RUN bun run build FROM nginx:stable-alpine +RUN apk add --no-cache iproute2 + EXPOSE 80/tcp -COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf +COPY ./nginx/default.conf.template /etc/nginx/conf.d/default.conf +COPY ./docker-entrypoint.sh /docker-entrypoint-custom.sh +RUN chmod +x /docker-entrypoint-custom.sh COPY --from=builder /app/build /usr/share/nginx/html HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD curl --fail --silent --output /dev/null http://localhost || exit 1 + CMD curl --fail --silent --output /dev/null http://localhost || exit 1 + +ENTRYPOINT ["/docker-entrypoint-custom.sh"] +CMD ["nginx", "-g", "daemon off;"]