From 0d79fcf8a5ac5a6f7a14e89d72dd4f3878d7ace8 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 4 Mar 2024 13:00:17 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=90=B3=20Fix=20Docker=20arm/v7=20supp?= =?UTF-8?q?ort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build-publish.yml | 20 ++++++++++++++++++++ Dockerfile | 6 +++--- package.json | 4 ++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml index 4e86b8a5..851298c0 100644 --- a/.github/workflows/docker-build-publish.yml +++ b/.github/workflows/docker-build-publish.yml @@ -14,6 +14,13 @@ on: - '.github/workflows/docker-build-publish.yml' - 'Dockerfile' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + packages: write + env: DH_IMAGE: ${{ secrets.DOCKER_REPO }} GH_IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }} @@ -52,9 +59,22 @@ jobs: - name: 🔧 Set up QEMU uses: docker/setup-qemu-action@v1 + with: + platforms: linux/amd64,linux/arm64,linux/arm/v7 - name: 🔧 Set up Docker Buildx uses: docker/setup-buildx-action@v1 + id: buildx + with: + driver-opts: image=moby/buildkit:v0.10.6 + + - name: 👀 Inspect builder + run: | + echo "Name: ${{ steps.buildx.outputs.name }}" + echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" + echo "Status: ${{ steps.buildx.outputs.status }}" + echo "Flags: ${{ steps.buildx.outputs.flags }}" + echo "Platforms: ${{ steps.buildx.outputs.platforms }}" - name: 🔑 Login to DockerHub uses: docker/login-action@v1 diff --git a/Dockerfile b/Dockerfile index 676ee4ae..f04224f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.11.1-alpine AS BUILD_IMAGE +FROM node:18.19.1-alpine AS BUILD_IMAGE # Set the platform to build image for ARG TARGETPLATFORM @@ -22,10 +22,10 @@ RUN yarn install --ignore-engines --immutable --no-cache --network-timeout 30000 COPY . ./ # Build initial app for production -RUN NODE_OPTIONS=--openssl-legacy-provider yarn build --mode production +RUN yarn build --mode production # Production stage -FROM node:20.11.1-alpine +FROM node:20.11.1-alpine3.19 # Define some ENV Vars ENV PORT=80 \ diff --git a/package.json b/package.json index 562d4030..8e4f144a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "Dashy", + "name": "dashy", "version": "2.1.2", "license": "MIT", "main": "server", @@ -7,7 +7,7 @@ "scripts": { "start": "node server", "dev": "vue-cli-service serve", - "build": "vue-cli-service build", + "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", "lint": "vue-cli-service lint", "pm2-start": "npx pm2 start server.js", "build-watch": "vue-cli-service build --watch --mode production", From 4886e97f2cc723e275560b040316b3f5abdf4f54 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 4 Mar 2024 13:40:03 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=E2=9A=A1=20Remove=20NODE=5FOPTIONS=20from?= =?UTF-8?q?=20build=20command,=20fix=20Netlify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 1 + Dockerfile | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..2b008da6 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +node-options="--openssl-legacy-provider" diff --git a/Dockerfile b/Dockerfile index f04224f9..1722d11f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN yarn install --ignore-engines --immutable --no-cache --network-timeout 30000 COPY . ./ # Build initial app for production -RUN yarn build --mode production +RUN NODE_OPTIONS=--openssl-legacy-provider yarn build --mode production # Production stage FROM node:20.11.1-alpine3.19 diff --git a/package.json b/package.json index 8e4f144a..96af62f5 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "node server", "dev": "vue-cli-service serve", - "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", + "build": "vue-cli-service build", "lint": "vue-cli-service lint", "pm2-start": "npx pm2 start server.js", "build-watch": "vue-cli-service build --watch --mode production", From 08e6bc6c27838007e9d3976ebd4ce6b964405192 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 4 Mar 2024 13:47:15 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=E2=9A=A1=20Update=20Node=20version=20for?= =?UTF-8?q?=20Netlify=20deployments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 1 - Dockerfile | 2 +- netlify.toml | 2 +- package.json | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 2b008da6..00000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -node-options="--openssl-legacy-provider" diff --git a/Dockerfile b/Dockerfile index 1722d11f..f04224f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN yarn install --ignore-engines --immutable --no-cache --network-timeout 30000 COPY . ./ # Build initial app for production -RUN NODE_OPTIONS=--openssl-legacy-provider yarn build --mode production +RUN yarn build --mode production # Production stage FROM node:20.11.1-alpine3.19 diff --git a/netlify.toml b/netlify.toml index 4cbae19d..73d23e8e 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,7 +8,7 @@ command = "yarn build" publish = "dist" functions = "services/serverless-functions" - environment = { NODE_VERSION = "16.13.2" } + environment = { NODE_VERSION = "20.11.1", NODE_OPTIONS = "--openssl-legacy-provider" } # Site info, used for the 1-Click deploy page [template.environment] diff --git a/package.json b/package.json index 96af62f5..8e4f144a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "node server", "dev": "vue-cli-service serve", - "build": "vue-cli-service build", + "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", "lint": "vue-cli-service lint", "pm2-start": "npx pm2 start server.js", "build-watch": "vue-cli-service build --watch --mode production", From da12eb65a0d7128f2ca303983f417b9044e492b1 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 4 Mar 2024 13:58:00 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=E2=9A=A1=20Sets=20YARN=5FFLAGS=20in=20Netl?= =?UTF-8?q?ify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 73d23e8e..9aca41e9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,7 +8,7 @@ command = "yarn build" publish = "dist" functions = "services/serverless-functions" - environment = { NODE_VERSION = "20.11.1", NODE_OPTIONS = "--openssl-legacy-provider" } + environment = { NODE_VERSION = "20.11.1", NODE_OPTIONS = "--openssl-legacy-provider", YARN_FLAGS = "--ignore-engines" } # Site info, used for the 1-Click deploy page [template.environment] From 427e46a7029498fe58796daf7619071c671e5c24 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 4 Mar 2024 15:13:31 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=E2=9A=A1=20Neaten=20build=20environment=20?= =?UTF-8?q?options=20in=20Netlify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/netlify.toml b/netlify.toml index 9aca41e9..9da589bd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,14 +8,12 @@ command = "yarn build" publish = "dist" functions = "services/serverless-functions" - environment = { NODE_VERSION = "20.11.1", NODE_OPTIONS = "--openssl-legacy-provider", YARN_FLAGS = "--ignore-engines" } -# Site info, used for the 1-Click deploy page -[template.environment] - STATUSKIT_PAGE_TITLE = "Dashy" - STATUSKIT_COMPANY_LOGO = "https://raw.githubusercontent.com/Lissy93/dashy/master/docs/assets/logo.png" - STATUSKIT_SUPPORT_CONTACT_LINK = "https://github.com/lissy93/dashy" - STATUSKIT_RESOURCES_LINK = "https://dashy.to/docs" +# Environmental variables for build command +[build.environment] + NODE_VERSION = "20.11.1" + NODE_OPTIONS = "--openssl-legacy-provider" + YARN_FLAGS = "--ignore-engines" # Redirect the Node endpoints to serverless functions [[redirects]]