Skip to content

Commit

Permalink
fix: change Dockerfile files with new pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia committed Oct 27, 2023
1 parent e070ac7 commit 28fd996
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
18 changes: 14 additions & 4 deletions packages/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.20-alpine as build
FROM node:18.16.0-alpine as build

USER root

Expand Down Expand Up @@ -83,15 +83,25 @@ WORKDIR /app

RUN chown node:node /

# Install pnpm
RUN npm install -g pnpm

# Copy application dependency manifests to the container image.
COPY ./package*.json ./
COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
COPY ./pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY ./lerna.json ./lerna.json
COPY ./packages/server/package*.json ./packages/server/

COPY ./lerna.json ./lerna.json
#
RUN apk update
RUN apk add python3 build-base chromium

# Set PYHTON env
ENV PYTHON=/usr/bin/python3

# Install app dependencies for production.
RUN npm install
RUN npm run bootstrap
RUN pnpm install

COPY --chown=node:node ./packages/server ./packages/server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ export const BalanceSheetNetIncomePP = (Base: any) =>
),
this.assocPreviousPeriodNetIncomeNode
)(node);
};
};
};
23 changes: 16 additions & 7 deletions packages/webapp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
FROM node:14.15.0 as build
FROM node:18.16.0-alpine as build

USER root

WORKDIR /app

# Install dependencies
COPY package*.json ./
COPY lerna.json ./
# Copy application dependency manifests to the container image.
COPY ./package*.json ./
COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
COPY ./pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY ./lerna.json ./lerna.json
COPY ./packages/webapp/package*.json ./packages/webapp/

COPY ./packages/webapp/package*.json /app/packages/webapp/
#
RUN apk update
RUN apk add python3 build-base chromium

RUN npm install
RUN npm run bootstrap
# Set PYHTON env
ENV PYTHON=/usr/bin/python3

# Install pnpm dependencies
RUN npm install -g pnpm
RUN pnpm install

# Build webapp package
COPY ./packages/webapp /app/packages/webapp
Expand Down

0 comments on commit 28fd996

Please sign in to comment.