From f56f21de79b502cbcac27611a64bb4a402b097bd Mon Sep 17 00:00:00 2001 From: Kuan Fan Date: Fri, 8 Dec 2023 16:43:16 -0800 Subject: [PATCH] copy dist from builder to nginx --- frontend/Dockerfile.openshift | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/frontend/Dockerfile.openshift b/frontend/Dockerfile.openshift index 5ef9b933c..eda47df8c 100644 --- a/frontend/Dockerfile.openshift +++ b/frontend/Dockerfile.openshift @@ -3,12 +3,9 @@ ENV NODE_ENV=production WORKDIR /usr/src/app COPY ./ ./ RUN npm install --omit=dev && \ - npm run build && \ - ls -l + npm run build -# Stage 2: Copy the JS React SPA into the Nginx HTML directory -# FROM artifacts.developer.gov.bc.ca/docker-remote/bitnami/nginx:1.25.3 -# COPY ./nginx.conf /opt/bitnami/nginx/conf/ -# COPY --from=builder /usr/src/app/public/build /app -# EXPOSE 3000 -# CMD ["nginx", "-g", "daemon off;"] +FROM artifacts.developer.gov.bc.ca/docker-remote/bitnami/nginx:1.24.0 +COPY --from=builder /usr/src/app/dist /app +EXPOSE 8080 +CMD ["nginx", "-g", "daemon off;"]