Skip to content

Commit

Permalink
update docker files for pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeeorgreentea committed Aug 1, 2024
1 parent c0cc6a2 commit e9f9737
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
7 changes: 4 additions & 3 deletions scripts/Dockerfile.connector
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
7 changes: 3 additions & 4 deletions scripts/Dockerfile.embedder
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

Expand Down
7 changes: 4 additions & 3 deletions scripts/Dockerfile.manager
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
9 changes: 5 additions & 4 deletions scripts/Dockerfile.portal
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
7 changes: 4 additions & 3 deletions scripts/Dockerfile.server
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
7 changes: 4 additions & 3 deletions scripts/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

0 comments on commit e9f9737

Please sign in to comment.