From 770a50ede58ae15422e82a4ce972f53ffd55000a Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:53:07 -0400 Subject: [PATCH] restoring to the original --- Dockerfile | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 407fa01..850db6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,8 +33,6 @@ ARG APP_PACKAGE_REGISTRY_TOKEN=$(APP_PACKAGE_REGISTRY_TOKEN) RUN printf "$APP_PACKAGE_RENCI_REGISTRY\n" >> .npmrc RUN printf "$APP_PACKAGE_REGISTRY_TOKEN\n" >> .npmrc -RUN cat .npmrc - # install package components RUN npm install @@ -100,26 +98,22 @@ RUN printf "REACT_APP_HURRICANE_ICON_URL_DEV=$APP_UI_HURRICANE_ICON_DEV_URL\n" > # Copy in source files COPY . /src -RUN pwd -RUN ls -al -RUN cat .npmrc - # Build the app RUN npm run build #################### ## startup the nginx server #################### -#FROM ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine3.19 -# -## get the source files for the site in the right place -#COPY --from=build /src/dist /usr/share/nginx/html -# -## disable nginx user because now this is running as non-root -#RUN sed -i 's/user nginx;/#user nginx;/g' /etc/nginx/nginx.conf -# -## copy in the configuration file -#COPY nginx.conf /etc/nginx/conf.d/default.conf -# -## start the web server -#CMD ["nginx", "-g", "daemon off;"] +FROM ghcr.io/nginxinc/nginx-unprivileged:1.27-alpine3.19 + +# get the source files for the site in the right place +COPY --from=build /src/dist /usr/share/nginx/html + +# disable nginx user because now this is running as non-root +RUN sed -i 's/user nginx;/#user nginx;/g' /etc/nginx/nginx.conf + +# copy in the configuration file +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# start the web server +CMD ["nginx", "-g", "daemon off;"]