feat(docker): update Node.js version to 24.15.0 in Dockerfile and test workflow
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [24.x]
|
node-version: [24.15.0]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|||||||
+5
-4
@@ -1,25 +1,26 @@
|
|||||||
# Byggas från backend-mappen: docker build -t recipe-api:local .
|
# Byggas från backend-mappen: docker build -t recipe-api:local .
|
||||||
|
|
||||||
# Stage 1: Bygg applikationen
|
# Stage 1: Bygg applikationen
|
||||||
FROM node:22-alpine AS builder
|
FROM node:24.15.0-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Kopiera backend-filer
|
# Kopiera backend-filer
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
|
COPY package-lock.json ./
|
||||||
COPY prisma ./prisma
|
COPY prisma ./prisma
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY tsconfig.json ./
|
COPY tsconfig.json ./
|
||||||
COPY nest-cli.json ./
|
COPY nest-cli.json ./
|
||||||
|
|
||||||
# Köra npm install
|
# Köra npm ci för reproducerbara builds
|
||||||
RUN npm install
|
RUN npm ci
|
||||||
|
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
RUN npm test
|
RUN npm test
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Kör applikationen
|
# Stage 2: Kör applikationen
|
||||||
FROM node:22-alpine AS runner
|
FROM node:24.15.0-alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user