fix timeout while build, and prefer-offline for npm deps

This commit is contained in:
2025-11-30 14:49:39 +01:00
parent f3f67171aa
commit 54d4f09666
4 changed files with 4 additions and 26 deletions

View File

@@ -23,6 +23,7 @@ jobs:
- name: Build & tag - name: Build & tag
timeout-minutes: 60
env: env:
REG: ${{ secrets.HARBOR_REGISTRY }} REG: ${{ secrets.HARBOR_REGISTRY }}
PROJ: ${{ secrets.HARBOR_PROJECT }} PROJ: ${{ secrets.HARBOR_PROJECT }}

View File

@@ -2,7 +2,7 @@
FROM node:22-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 --prefer-offline --no-audit --progress=false
# Stage 2: Build frontend # Stage 2: Build frontend
FROM node:22-alpine AS frontend-builder FROM node:22-alpine AS frontend-builder
@@ -16,7 +16,8 @@ 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 --prefer-offline --no-audit --progress=false || \
(echo "npm ci failed, retrying without cache..." && npm ci --no-audit --progress=false)
# Stage 4: Build backend # Stage 4: Build backend
FROM node:22-alpine AS backend-builder FROM node:22-alpine AS backend-builder

View File

@@ -58,7 +58,6 @@
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/clamscan": "^2.4.1", "@types/clamscan": "^2.4.1",
"@types/cookie-parser": "^1.4.8", "@types/cookie-parser": "^1.4.8",
"@types/cron": "^2.4.0",
"@types/express": "^5.0.1", "@types/express": "^5.0.1",
"@types/mime-types": "^2.1.4", "@types/mime-types": "^2.1.4",
"@types/multer": "^1.4.12", "@types/multer": "^1.4.12",
@@ -66,7 +65,6 @@
"@types/nodemailer": "^6.4.17", "@types/nodemailer": "^6.4.17",
"@types/passport-jwt": "^4.0.1", "@types/passport-jwt": "^4.0.1",
"@types/qrcode-svg": "^1.1.5", "@types/qrcode-svg": "^1.1.5",
"@types/sharp": "^0.32.0",
"@types/supertest": "^6.0.3", "@types/supertest": "^6.0.3",
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.29.1", "@typescript-eslint/eslint-plugin": "^8.29.1",
@@ -4103,16 +4101,6 @@
"integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==", "integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==",
"dev": true "dev": true
}, },
"node_modules/@types/cron": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/@types/cron/-/cron-2.4.3.tgz",
"integrity": "sha512-ViRBkoZD9Rk0hGeMdd2GHGaOaZuH9mDmwsE5/Zo53Ftwcvh7h9VJc8lIt2wdgEwS4EW5lbtTX6vlE0idCLPOyA==",
"deprecated": "This is a stub types definition. cron provides its own type definitions, so you do not need this installed.",
"dev": true,
"dependencies": {
"cron": "*"
}
},
"node_modules/@types/eslint": { "node_modules/@types/eslint": {
"version": "9.6.1", "version": "9.6.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz",
@@ -4313,16 +4301,6 @@
"@types/send": "*" "@types/send": "*"
} }
}, },
"node_modules/@types/sharp": {
"version": "0.32.0",
"resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.32.0.tgz",
"integrity": "sha512-OOi3kL+FZDnPhVzsfD37J88FNeZh6gQsGcLc95NbeURRGvmSjeXiDcyWzF2o3yh/gQAUn2uhh/e+CPCa5nwAxw==",
"deprecated": "This is a stub types definition. sharp provides its own type definitions, so you do not need this installed.",
"dev": true,
"dependencies": {
"sharp": "*"
}
},
"node_modules/@types/superagent": { "node_modules/@types/superagent": {
"version": "8.1.9", "version": "8.1.9",
"resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.9.tgz", "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.9.tgz",

View File

@@ -63,7 +63,6 @@
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
"@types/clamscan": "^2.4.1", "@types/clamscan": "^2.4.1",
"@types/cookie-parser": "^1.4.8", "@types/cookie-parser": "^1.4.8",
"@types/cron": "^2.4.0",
"@types/express": "^5.0.1", "@types/express": "^5.0.1",
"@types/mime-types": "^2.1.4", "@types/mime-types": "^2.1.4",
"@types/multer": "^1.4.12", "@types/multer": "^1.4.12",
@@ -71,7 +70,6 @@
"@types/nodemailer": "^6.4.17", "@types/nodemailer": "^6.4.17",
"@types/passport-jwt": "^4.0.1", "@types/passport-jwt": "^4.0.1",
"@types/qrcode-svg": "^1.1.5", "@types/qrcode-svg": "^1.1.5",
"@types/sharp": "^0.32.0",
"@types/supertest": "^6.0.3", "@types/supertest": "^6.0.3",
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.29.1", "@typescript-eslint/eslint-plugin": "^8.29.1",