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",