update npm and node to 22

This commit is contained in:
deflax 2024-05-04 00:28:45 +03:00
parent 227b527ae0
commit 7f8e3a5948
2 changed files with 5367 additions and 16632 deletions

View file

@ -1,17 +1,40 @@
# pull official base image # pull official base image
FROM node:20-alpine FROM node:22-alpine AS build
# set working directory # set working directory
WORKDIR /usr/src/app WORKDIR /app
# add `/usr/src/app/node_modules/.bin` to $PATH ENV PATH /app/node_modules/.bin:$PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH ENV NODE_ENV development
# install and cache app dependencies # install and cache app dependencies
COPY package.json . ADD package.json /app
COPY package-lock.json . ADD package-lock.json /app
RUN npm ci
ADD front /app/front
#ADD front/config.js /app/src/config.js
ADD public /app/public
ADD ["webpack.config.js", ".babelrc", "/app/"]
RUN npm run build
# pull official base image
FROM node:22-alpine
# set working directory
WORKDIR /app
ADD package*.json /app/
RUN npm ci RUN npm ci
RUN npm install react-scripts@5.0.1 -g --silent RUN npm install react-scripts@5.0.1 -g --silent
ADD . /app/
COPY --from=build /app/public /app/public
#VOLUME /app/data
USER node
# start app # start app
CMD [ "npm", "start" ] CMD [ "npm", "start" ]

File diff suppressed because it is too large Load diff