diff --git a/packages/server/Dockerfile b/packages/server/Dockerfile index af2de4263..1263ab20e 100644 --- a/packages/server/Dockerfile +++ b/packages/server/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.20-alpine as build +FROM node:18.16.0-alpine as build USER root @@ -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 diff --git a/packages/server/src/services/FinancialStatements/BalanceSheet/BalanceSheetNetIncomePP.ts b/packages/server/src/services/FinancialStatements/BalanceSheet/BalanceSheetNetIncomePP.ts index 40fe9c85a..c377511a3 100644 --- a/packages/server/src/services/FinancialStatements/BalanceSheet/BalanceSheetNetIncomePP.ts +++ b/packages/server/src/services/FinancialStatements/BalanceSheet/BalanceSheetNetIncomePP.ts @@ -71,4 +71,5 @@ export const BalanceSheetNetIncomePP = (Base: any) => ), this.assocPreviousPeriodNetIncomeNode )(node); - }; \ No newline at end of file + }; + }; diff --git a/packages/webapp/Dockerfile b/packages/webapp/Dockerfile index 6415a6510..f28364b18 100644 --- a/packages/webapp/Dockerfile +++ b/packages/webapp/Dockerfile @@ -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