mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-03-26 11:13:25 +01:00
fix timeout while build, and prefer-offline for npm deps
This commit is contained in:
@@ -23,6 +23,7 @@ jobs:
|
||||
|
||||
|
||||
- name: Build & tag
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
REG: ${{ secrets.HARBOR_REGISTRY }}
|
||||
PROJ: ${{ secrets.HARBOR_PROJECT }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
FROM node:22-alpine AS frontend-dependencies
|
||||
WORKDIR /opt/app
|
||||
COPY frontend/package.json frontend/package-lock.json ./
|
||||
RUN npm ci
|
||||
RUN npm ci --prefer-offline --no-audit --progress=false
|
||||
|
||||
# Stage 2: Build frontend
|
||||
FROM node:22-alpine AS frontend-builder
|
||||
@@ -16,7 +16,8 @@ FROM node:22-alpine AS backend-dependencies
|
||||
RUN apk add --no-cache python3
|
||||
WORKDIR /opt/app
|
||||
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
|
||||
FROM node:22-alpine AS backend-builder
|
||||
|
||||
22
backend/package-lock.json
generated
22
backend/package-lock.json
generated
@@ -58,7 +58,6 @@
|
||||
"@types/archiver": "^6.0.3",
|
||||
"@types/clamscan": "^2.4.1",
|
||||
"@types/cookie-parser": "^1.4.8",
|
||||
"@types/cron": "^2.4.0",
|
||||
"@types/express": "^5.0.1",
|
||||
"@types/mime-types": "^2.1.4",
|
||||
"@types/multer": "^1.4.12",
|
||||
@@ -66,7 +65,6 @@
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
"@types/passport-jwt": "^4.0.1",
|
||||
"@types/qrcode-svg": "^1.1.5",
|
||||
"@types/sharp": "^0.32.0",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
||||
@@ -4103,16 +4101,6 @@
|
||||
"integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==",
|
||||
"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": {
|
||||
"version": "9.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz",
|
||||
@@ -4313,16 +4301,6 @@
|
||||
"@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": {
|
||||
"version": "8.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.9.tgz",
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
"@types/archiver": "^6.0.3",
|
||||
"@types/clamscan": "^2.4.1",
|
||||
"@types/cookie-parser": "^1.4.8",
|
||||
"@types/cron": "^2.4.0",
|
||||
"@types/express": "^5.0.1",
|
||||
"@types/mime-types": "^2.1.4",
|
||||
"@types/multer": "^1.4.12",
|
||||
@@ -71,7 +70,6 @@
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
"@types/passport-jwt": "^4.0.1",
|
||||
"@types/qrcode-svg": "^1.1.5",
|
||||
"@types/sharp": "^0.32.0",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
||||
|
||||
Reference in New Issue
Block a user