diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 088710ae..6a38a604 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' check-latest: true cache: 'npm' cache-dependency-path: | diff --git a/.github/workflows/npm-update-bot.yml b/.github/workflows/npm-update-bot.yml index ab5e0fba..1bfa47ad 100644 --- a/.github/workflows/npm-update-bot.yml +++ b/.github/workflows/npm-update-bot.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' check-latest: true cache: 'npm' cache-dependency-path: | diff --git a/Dockerfile b/Dockerfile index fe3ae8d5..cdae1edf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,20 @@ -# There's an issue with node:20-alpine. -# Docker deployment is canceled after 25< minutes. - +# As a workaround we have to build on nodejs 18 +# nodejs 20 hangs on build with armv6/armv7 FROM docker.io/library/node:18-alpine AS build_node_modules # Copy Web UI COPY src/ /app/ WORKDIR /app RUN npm ci --omit=dev &&\ + # Enable this to run `npm run serve` + npm i -g nodemon &&\ + # Delete unnecessary files + npm cache clean --force && rm -rf ~/.npm &&\ mv node_modules /node_modules # Copy build result to a new image. # This saves a lot of disk space. -FROM docker.io/library/node:18-alpine +FROM docker.io/library/node:20-alpine COPY --from=build_node_modules /app /app # Move node_modules one directory up, so during development @@ -23,12 +26,6 @@ COPY --from=build_node_modules /app /app # than what runs inside of docker. COPY --from=build_node_modules /node_modules /node_modules -RUN \ - # Enable this to run `npm run serve` - npm i -g nodemon &&\ - # Delete unnecessary files - npm cache clean --force && rm -rf ~/.npm - # Install Linux packages RUN apk add --no-cache \ dpkg \ diff --git a/src/package-lock.json b/src/package-lock.json index 3e728820..74f4c21d 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -21,7 +21,7 @@ "tailwindcss": "^3.4.3" }, "engines": { - "node": "18" + "node": "20" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/src/package.json b/src/package.json index d98a388f..f8359570 100644 --- a/src/package.json +++ b/src/package.json @@ -30,6 +30,6 @@ ] }, "engines": { - "node": "18" + "node": "20" } }