From edc0f27e0f32e6f0838327775408ca3577da65d8 Mon Sep 17 00:00:00 2001 From: Lalit Sudhir Date: Mon, 20 Oct 2025 12:31:04 -0700 Subject: [PATCH] Adding Docker image for Simple mode --- .github/workflows/build-and-publish.yml | 24 +++++++++++++++++++----- docker-compose.yml | 6 +++--- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 5f4c975..26954ef 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -1,4 +1,4 @@ -name: build docker image and push to dockerhub +name: Build and Push Docker Images (Default + Simple Mode) on: push: @@ -6,6 +6,7 @@ on: - 'main' tags: - 'v*' + workflow_dispatch: jobs: docker-build-and-push: @@ -13,6 +14,15 @@ jobs: permissions: contents: write packages: write + strategy: + matrix: + mode: + - name: default + simple_mode: false + suffix: "" + - name: simple + simple_mode: true + suffix: "-simple" steps: - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -35,12 +45,16 @@ jobs: echo "version_without_v=latest" >> $GITHUB_OUTPUT fi - - name: Build and push + - name: Build and push ${{ matrix.mode.name }} image uses: docker/build-push-action@v6 with: push: true + build-args: | + SIMPLE_MODE=${{ matrix.mode.simple_mode }} tags: | - bentopdf/bentopdf:latest - bentopdf/bentopdf:${{ steps.version.outputs.version_without_v }} - bentopdf/bentopdf:${{ steps.version.outputs.version }} + altruisticisopod/bentopdf${{ matrix.mode.suffix }}:latest + altruisticisopod/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }} + altruisticisopod/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/docker-compose.yml b/docker-compose.yml index 2c9d236..bb6c88f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ services: bentopdf: + # default mode + # simple mode - bentopdf-simple:latest image: bentopdf/bentopdf:latest container_name: bentopdf restart: unless-stopped ports: - - '3000:80' - environment: - - SIMPLE_MODE=${SIMPLE_MODE:-false} + - '3000:80' \ No newline at end of file