Skip to content

Commit

Permalink
fix: change Dockerfile files with new pnpm (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
abouolia authored Oct 27, 2023
1 parent e070ac7 commit 078a7ea
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 13 deletions.
20 changes: 15 additions & 5 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
# Install application dependencies
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
# Install packages dependencies for production.
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/
# Install application dependencies
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 packages dependencies
RUN npm install -g pnpm
RUN pnpm install

# Build webapp package
COPY ./packages/webapp /app/packages/webapp
Expand Down
5 changes: 5 additions & 0 deletions packages/webapp/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ module.exports = {
alias: {
'@': path.resolve(__dirname, 'src'),
},
configure: {
resolve: {
fallback: { path: require.resolve('path-browserify') },
},
},
},
};

1 comment on commit 078a7ea

@vercel
Copy link

@vercel vercel bot commented on 078a7ea Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.