From e9f973747afb9b93430a2837c24e0e5b48bf657b Mon Sep 17 00:00:00 2001 From: coffeeorgreentea <90069434+coffeeorgreentea@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:35:44 -0400 Subject: [PATCH] update docker files for pnpm --- scripts/Dockerfile.connector | 7 ++++--- scripts/Dockerfile.embedder | 7 +++---- scripts/Dockerfile.manager | 7 ++++--- scripts/Dockerfile.portal | 9 +++++---- scripts/Dockerfile.server | 7 ++++--- scripts/Dockerfile.worker | 7 ++++--- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/scripts/Dockerfile.connector b/scripts/Dockerfile.connector index f2c38b8569..f347b8586e 100644 --- a/scripts/Dockerfile.connector +++ b/scripts/Dockerfile.connector @@ -15,9 +15,10 @@ RUN git submodule update --init --recursive portal/cloud # RUN poetry install --no-root -RUN npm install +RUN npm install -g pnpm +RUN pnpm install -RUN npm run build-connector +RUN pnpm build-connector -ENTRYPOINT [ "npm", "run" ] +ENTRYPOINT [ "pnpm" ] CMD [ "start-connector" ] \ No newline at end of file diff --git a/scripts/Dockerfile.embedder b/scripts/Dockerfile.embedder index 17fd7018f9..991ad9b6ec 100644 --- a/scripts/Dockerfile.embedder +++ b/scripts/Dockerfile.embedder @@ -16,13 +16,12 @@ RUN git submodule update --init --recursive portal/cloud # This application does not need the prisma clients RUN sed -i '/"postinstall":/d' package.json -RUN npm install - -RUN npm i +RUN npm install -g pnpm +RUN pnpm install # Using the nx cli to build the app the .output folder is disappearing # I'll figure it out later but for now this works -RUN cd apps/embedder && npx nitro prepare && npx nitro build +RUN cd apps/embedder && pnpm nitro prepare && pnpm nitro build ENTRYPOINT [ "node", "./apps/embedder/.output/server/index.mjs" ] diff --git a/scripts/Dockerfile.manager b/scripts/Dockerfile.manager index c1e7c92411..fa861b16b8 100644 --- a/scripts/Dockerfile.manager +++ b/scripts/Dockerfile.manager @@ -15,9 +15,10 @@ RUN git submodule update --init --recursive portal/cloud # RUN poetry install --no-root -RUN npm install +RUN npm install -g pnpm +RUN pnpm install -RUN npm run build-cloud-agent-manager +RUN pnpm build-cloud-agent-manager -ENTRYPOINT [ "npm", "run" ] +ENTRYPOINT [ "pnpm" ] CMD [ "start-cloud-agent-manager" ] \ No newline at end of file diff --git a/scripts/Dockerfile.portal b/scripts/Dockerfile.portal index 3c9cf3d413..d16cc3bcd5 100644 --- a/scripts/Dockerfile.portal +++ b/scripts/Dockerfile.portal @@ -24,12 +24,13 @@ WORKDIR /app # Clone the submodule RUN git submodule update --init --recursive portal/cloud -# Install dependencies -RUN npm install --foreground-scripts + +RUN npm install -g pnpm +RUN pnpm install --foreground-scripts # Build the project -RUN npx nx build portal --skip-nx-cache +RUN pnpm nx build portal --skip-nx-cache # Set the entrypoint and command -ENTRYPOINT [ "npx" ] +ENTRYPOINT [ "pnpm" ] CMD [ "next", "start", "dist/portal/cloud/apps/portal/.next" ] diff --git a/scripts/Dockerfile.server b/scripts/Dockerfile.server index f936a52006..a011aeeb09 100644 --- a/scripts/Dockerfile.server +++ b/scripts/Dockerfile.server @@ -15,9 +15,10 @@ RUN git submodule update --init --recursive portal/cloud # RUN poetry install --no-root -RUN npm install +RUN npm install -g pnpm +RUN pnpm install -RUN npm run build-server +RUN pnpm build-server -ENTRYPOINT [ "npm", "run" ] +ENTRYPOINT [ "pnpm" ] CMD [ "start-server" ] \ No newline at end of file diff --git a/scripts/Dockerfile.worker b/scripts/Dockerfile.worker index 07d9743540..42c036b03f 100644 --- a/scripts/Dockerfile.worker +++ b/scripts/Dockerfile.worker @@ -15,9 +15,10 @@ RUN git submodule update --init --recursive portal/cloud # RUN poetry install --no-root -RUN npm install +RUN npm install -g pnpm +RUN pnpm install -RUN npm run build-cloud-agent-worker +RUN pnpm build-cloud-agent-worker -ENTRYPOINT [ "npm", "run" ] +ENTRYPOINT [ "pnpm" ] CMD [ "start-cloud-agent-worker" ] \ No newline at end of file