chore: upgrade to nodejs 22
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,25 +1,25 @@
|
|||||||
# Stage 1: Frontend dependencies
|
# Stage 1: Frontend dependencies
|
||||||
FROM node:20-alpine AS frontend-dependencies
|
FROM node:22-alpine AS frontend-dependencies
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY frontend/package.json frontend/package-lock.json ./
|
COPY frontend/package.json frontend/package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
# Stage 2: Build frontend
|
# Stage 2: Build frontend
|
||||||
FROM node:20-alpine AS frontend-builder
|
FROM node:22-alpine AS frontend-builder
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY ./frontend .
|
COPY ./frontend .
|
||||||
COPY --from=frontend-dependencies /opt/app/node_modules ./node_modules
|
COPY --from=frontend-dependencies /opt/app/node_modules ./node_modules
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 3: Backend dependencies
|
# Stage 3: Backend dependencies
|
||||||
FROM node:20-alpine AS backend-dependencies
|
FROM node:22-alpine AS backend-dependencies
|
||||||
RUN apk add --no-cache python3
|
RUN apk add --no-cache python3
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY backend/package.json backend/package-lock.json ./
|
COPY backend/package.json backend/package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
# Stage 4: Build backend
|
# Stage 4: Build backend
|
||||||
FROM node:20-alpine AS backend-builder
|
FROM node:22-alpine AS backend-builder
|
||||||
RUN apk add openssl
|
RUN apk add openssl
|
||||||
|
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
@@ -29,7 +29,7 @@ RUN npx prisma generate
|
|||||||
RUN npm run build && npm prune --production
|
RUN npm run build && npm prune --production
|
||||||
|
|
||||||
# Stage 5: Final image
|
# Stage 5: Final image
|
||||||
FROM node:20-alpine AS runner
|
FROM node:22-alpine AS runner
|
||||||
ENV NODE_ENV=docker
|
ENV NODE_ENV=docker
|
||||||
|
|
||||||
# Delete default node user
|
# Delete default node user
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Your container is now listening on `http://localhost:<externalport>`, have fun w
|
|||||||
|
|
||||||
Required tools:
|
Required tools:
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/en/download/) >= 16
|
- [Node.js](https://nodejs.org/en/download/) >= 22
|
||||||
- [Git](https://git-scm.com/downloads)
|
- [Git](https://git-scm.com/downloads)
|
||||||
- [pm2](https://pm2.keymetrics.io/) for running Pingvin Share in the background
|
- [pm2](https://pm2.keymetrics.io/) for running Pingvin Share in the background
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user