From b9c47bb0a105711bcb108c27c55674349a444d8c Mon Sep 17 00:00:00 2001 From: Niraj Adhikari Date: Fri, 28 Jun 2024 11:19:15 +0545 Subject: [PATCH] fix: Frontend Dockerfile for volume issue in development env --- src/frontend/Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index f94112d0..22a1e730 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -8,17 +8,14 @@ RUN mkdir -p /app WORKDIR /app COPY ./src/frontend /app -# Install node packages -FROM base as package_installation -RUN yarn - # Run development environment -FROM package_installation as development +FROM base as development RUN env | tee .env -ENTRYPOINT [ "yarn", "start", "--host", "0.0.0.0" ] +ENTRYPOINT ["/bin/sh", "-c" , "yarn && yarn start --host 0.0.0.0"] # Generate frontend build files -FROM package_installation as build +FROM base as build +RUN yarn RUN yarn build # Copy static files to minio and generated index.html to backend services @@ -28,4 +25,3 @@ RUN apk update && apk add minio-client envsubst COPY --from=build /app/dist /tmp/dist COPY ./src/frontend/docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT [ "/docker-entrypoint.sh" ] -