diff --git a/packages/metrics/Dockerfile b/packages/metrics/Dockerfile index 0e054114ac5..7d3a81fdaba 100644 --- a/packages/metrics/Dockerfile +++ b/packages/metrics/Dockerfile @@ -3,14 +3,14 @@ FROM opencrvs/ocrvs-base:${VERSION} USER node -COPY --chown=node:node . . +USER node -RUN yarn install --frozen-lockfile +COPY --chown=node:node packages/commons /app/packages/commons +RUN cd packages/commons && yarn install --frozen-lockfile && yarn build -WORKDIR /app/packages/commons -RUN yarn build +COPY --chown=node:node packages/metrics /app/packages/metrics +RUN cd packages/metrics && yarn install --frozen-lockfile && yarn build WORKDIR /app/packages/metrics -RUN yarn build CMD ["yarn", "start:prod"] \ No newline at end of file diff --git a/packages/metrics/Dockerignore.dockerignore b/packages/metrics/Dockerfile.dockerignore similarity index 100% rename from packages/metrics/Dockerignore.dockerignore rename to packages/metrics/Dockerfile.dockerignore