From 747343043c7fb2289e93d6d4f68bfd0a927d37fc Mon Sep 17 00:00:00 2001 From: Leaflet <46334625+leafok88@users.noreply.github.com> Date: Sat, 24 Jan 2026 19:42:10 +0800 Subject: [PATCH 1/5] Set memory limit for lbbs-solr service to 512M --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4d1fc7b..ebc4c06 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,6 +36,7 @@ services: - /opt/solr/server/solr/configsets/lbbs networks: - app-network + mem_limit: 512M apache: image: leafok/lbbs-apache:testing From f64eb6d57072951eac55c3de6d8289e747c9ff12 Mon Sep 17 00:00:00 2001 From: Leaflet <46334625+leafok88@users.noreply.github.com> Date: Sat, 24 Jan 2026 21:33:22 +0800 Subject: [PATCH 2/5] Enhance Docker workflow with multiple image builds Added Docker image build steps for Solr, Apache, PHP, and BBSD with metadata extraction and caching. --- .github/workflows/docker-image.yml | 97 ++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d5f9f14..94979f6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -3,12 +3,13 @@ name: Docker Image CI on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] env: DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 - RUN_PLATFORM: linux/amd64 + SOLR_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-solr + APACHE_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-apache + PHP_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-php + BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd jobs: @@ -23,6 +24,90 @@ jobs: submodules: recursive fetch-depth: 0 # fetch all history if the action needs it - - name: Build images - # Build images and run containers in detached mode - run: sh -x build.sh + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract Docker metadata (solr) + id: meta-solr + uses: docker/metadata-action@v5 + with: + images: ${{ env.SOLR_IMAGE }} + + - name: Extract Docker metadata (apache) + id: meta-apache + uses: docker/metadata-action@v5 + with: + images: ${{ env.APACHE_IMAGE }} + + - name: Extract Docker metadata (php) + id: meta-php + uses: docker/metadata-action@v5 + with: + images: ${{ env.PHP_IMAGE }} + + - name: Extract Docker metadata (bbsd) + id: meta-bbsd + uses: docker/metadata-action@v5 + with: + images: ${{ env.BBSD_IMAGE }} + + - name: Build the Docker image (solr) + id: build-solr + uses: docker/build-push-action@v5 + with: + platforms: ${{ env.DOCKERHUB_PLATFORMS }} + context: . + file: Dockerfile/dockerfile.solr.testing + tags: | + ${{ steps.meta-solr.outputs.tags }} + labels: ${{ steps.meta-solr.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache + + - name: Build the Docker image (apache) + id: build-apache + uses: docker/build-push-action@v5 + with: + platforms: ${{ env.DOCKERHUB_PLATFORMS }} + context: . + file: Dockerfile/dockerfile.apache.testing + tags: | + ${{ steps.meta-apache.outputs.tags }} + labels: ${{ steps.meta-apache.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache + + - name: Build the Docker image (php) + id: build-php + uses: docker/build-push-action@v5 + with: + platforms: ${{ env.DOCKERHUB_PLATFORMS }} + context: . + file: Dockerfile/dockerfile.php.testing + tags: | + ${{ steps.meta-php.outputs.tags }} + labels: ${{ steps.meta-php.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache + + - name: Build the Docker image (bbsd) + id: build-bbsd + uses: docker/build-push-action@v5 + with: + platforms: ${{ env.DOCKERHUB_PLATFORMS }} + context: . + file: Dockerfile/dockerfile.bbsd.testing + tags: | + ${{ steps.meta-bbsd.outputs.tags }} + labels: ${{ steps.meta-bbsd.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache From 1e8663c1a1c6b79ac051ba7a9290d4b01e757a23 Mon Sep 17 00:00:00 2001 From: Leaflet <46334625+leafok88@users.noreply.github.com> Date: Sat, 24 Jan 2026 22:05:52 +0800 Subject: [PATCH 3/5] Add Docker metadata extraction for multiple images --- .github/workflows/docker-publish.yml | 44 +++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index dbdb615..5958de8 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -51,6 +51,30 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Extract Docker metadata (solr) + id: meta-solr + uses: docker/metadata-action@v5 + with: + images: ${{ env.APACHE_IMAGE }} + + - name: Extract Docker metadata (apache) + id: meta-apache + uses: docker/metadata-action@v5 + with: + images: ${{ env.APACHE_IMAGE }} + + - name: Extract Docker metadata (php) + id: meta-php + uses: docker/metadata-action@v5 + with: + images: ${{ env.PHP_IMAGE }} + + - name: Extract Docker metadata (bbsd) + id: meta-bbsd + uses: docker/metadata-action@v5 + with: + images: ${{ env.PHP_IMAGE }} + - name: Build the Docker image (solr) id: push-solr uses: docker/build-push-action@v5 @@ -62,7 +86,10 @@ jobs: tags: | ${{ env.SOLR_IMAGE }}:testing-${{ env.BUILD_DATE }} ${{ env.SOLR_IMAGE }}:testing - labels: ${{ steps.meta.outputs.labels }} + ${{ steps.meta-solr.outputs.tags }} + labels: ${{ steps.meta-solr.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache - name: Build the Docker image (apache) id: push-apache @@ -75,7 +102,10 @@ jobs: tags: | ${{ env.APACHE_IMAGE }}:testing-${{ env.BUILD_DATE }} ${{ env.APACHE_IMAGE }}:testing - labels: ${{ steps.meta.outputs.labels }} + ${{ steps.meta-apache.outputs.tags }} + labels: ${{ steps.meta-apache.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache - name: Build the Docker image (php) id: push-php @@ -88,7 +118,10 @@ jobs: tags: | ${{ env.PHP_IMAGE }}:testing-${{ env.BUILD_DATE }} ${{ env.PHP_IMAGE }}:testing - labels: ${{ steps.meta.outputs.labels }} + ${{ steps.meta-php.outputs.tags }} + labels: ${{ steps.meta-php.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache - name: Build the Docker image (bbsd) id: push-bbsd @@ -101,4 +134,7 @@ jobs: tags: | ${{ env.BBSD_IMAGE }}:testing-${{ env.BUILD_DATE }} ${{ env.BBSD_IMAGE }}:testing - labels: ${{ steps.meta.outputs.labels }} + ${{ steps.meta-bbsd.outputs.tags }} + labels: ${{ steps.meta-bbsd.outputs.labels }} + cache-from: type=gha # Pull cache from GitHub Actions cache + cache-to: type=gha,mode=max # Push cache to GitHub Actions cache From a777246b0709c6bdc67d47f8ab607fd28e2b3283 Mon Sep 17 00:00:00 2001 From: Leaflet Date: Sat, 24 Jan 2026 22:18:09 +0800 Subject: [PATCH 4/5] Update dependency --- lbbs | 2 +- leafok_bbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lbbs b/lbbs index b81d4f0..8971639 160000 --- a/lbbs +++ b/lbbs @@ -1 +1 @@ -Subproject commit b81d4f011035082ebedd5404b9f24f22c19f8975 +Subproject commit 89716390dc000877318741d14eb7ce54a425fc77 diff --git a/leafok_bbs b/leafok_bbs index 6540c69..f9c8430 160000 --- a/leafok_bbs +++ b/leafok_bbs @@ -1 +1 @@ -Subproject commit 6540c699fd5595788752a09bace74ed2ca412c5d +Subproject commit f9c8430d3a47d4b6d7f7d8f046229da124f0d5d9 From d8127c12bf202654316b806487b6be703ca27a31 Mon Sep 17 00:00:00 2001 From: Leaflet Date: Sat, 24 Jan 2026 22:35:30 +0800 Subject: [PATCH 5/5] Prevent concurrent workflow --- .github/workflows/docker-image.yml | 4 ++++ .github/workflows/docker-publish.yml | 4 ++++ lbbs | 2 +- leafok_bbs | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 94979f6..ca9d91a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -4,6 +4,10 @@ on: push: branches: [ "main" ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 SOLR_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-solr diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5958de8..7d02bdb 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,6 +13,10 @@ on: push: branches: [ "milestone" ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64 SOLR_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-solr diff --git a/lbbs b/lbbs index 8971639..ac14398 160000 --- a/lbbs +++ b/lbbs @@ -1 +1 @@ -Subproject commit 89716390dc000877318741d14eb7ce54a425fc77 +Subproject commit ac1439804f4b02e2abdfb595da9ee690c6e433ae diff --git a/leafok_bbs b/leafok_bbs index f9c8430..8c656f7 160000 --- a/leafok_bbs +++ b/leafok_bbs @@ -1 +1 @@ -Subproject commit f9c8430d3a47d4b6d7f7d8f046229da124f0d5d9 +Subproject commit 8c656f7c6268e88f088e96f07b288f30d3a28518