From 1c113788edb7b30881e9606ea433bf1bad8bf7b7 Mon Sep 17 00:00:00 2001 From: k2patel <1+k2patel@git.k2patel.in> Date: Wed, 30 Sep 2026 21:08:52 -0400 Subject: [PATCH] Build Flood v4.7.0 in client-only mode with manual release selection --- .gitea/workflows/build-push.yml | 7 +++---- Dockerfile.client | 24 +++++++----------------- README.md | 12 +++++++++--- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/build-push.yml b/.gitea/workflows/build-push.yml index f33ff6c..83c6d5b 100644 --- a/.gitea/workflows/build-push.yml +++ b/.gitea/workflows/build-push.yml @@ -1,14 +1,12 @@ name: Build and Push Custom Flood Image on: - push: - branches: [main] workflow_dispatch: inputs: flood_version: description: 'jesec/flood release tag' required: true - default: 'v4.16.2' + default: 'v4.7.0' type: string jobs: @@ -26,8 +24,9 @@ jobs: - name: Fetch Flood release env: - FLOOD_VERSION: ${{ github.event.inputs.flood_version || 'v4.16.2' }} + FLOOD_VERSION: ${{ github.event.inputs.flood_version }} run: | + test -n "$FLOOD_VERSION" || { echo "flood_version is required" >&2; exit 1; } git check-ref-format "refs/tags/$FLOOD_VERSION" git init flood-repo git -C flood-repo fetch --depth=1 https://github.com/jesec/flood.git "refs/tags/$FLOOD_VERSION" diff --git a/Dockerfile.client b/Dockerfile.client index c119ca0..fe5374f 100644 --- a/Dockerfile.client +++ b/Dockerfile.client @@ -1,14 +1,5 @@ -# WARNING: -# -# For development and debugging only. Use Dockerfile.release for production. -# -# This image bundles rTorrent for easier debugging. It is not started by default. -# Use --rtorrent argument if you wish to start the bundled rTorrent. -# For production, use rtorrent-flood instead. -# -# This Dockerfile uses contents of current folder which might contain -# secrets, uncommitted changes or other sensitive information. DO NOT -# publish the result image unless it was composed in a clean environment. +# Flood UI only: connects to an external torrent service. No bundled rTorrent. +# Build from a clean upstream release checkout using the Gitea workflow. ARG BUILDPLATFORM=amd64 ARG NODE_IMAGE=docker.io/node:24-alpine3.24 @@ -20,13 +11,12 @@ WORKDIR /usr/src/app/ # Copy project files COPY . ./ -RUN npm i -g corepack && corepack enable && corepack install +# Flood v4.7.0 uses package-lock.json, not pnpm. +RUN npm ci --legacy-peer-deps --omit=optional -# Fetch dependencies from npm -RUN pnpm install --frozen-lockfile - -# Build assets -RUN npm run build +# The v4.7 Webpack toolchain needs legacy hashing with modern Node/OpenSSL. +# This option applies only to asset compilation, not the running server. +RUN NODE_OPTIONS=--openssl-legacy-provider npm run build-assets # Now get the clean Node.js image FROM ${NODE_IMAGE} as flood diff --git a/README.md b/README.md index 1a57bc7..8e727cb 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,15 @@ Report issues at https://github.com/k2patel/docker-flood-client/issues. For contributions, open an issue with a link to your branch or patch on another Git provider. Changes are reviewed and applied by the maintainer on Gitea. -Gitea Actions publishes `docker.io/k2patel/floodui:latest` on pushes to `main` -and manual runs. The default Flood release is `v4.16.2`; manual runs can select -another release with `flood_version`. Builds use the custom `Dockerfile.client`. +Gitea Actions publishes `docker.io/k2patel/floodui:latest` only on manual runs. +Select `main` in Actions → Build and Push Custom Flood Image → Run workflow +and set the required `flood_version` release tag. The configured release is +`v4.7.0`. Repository pushes do not trigger builds. + +This is a Flood-only image using the custom `Dockerfile.client`: it runs the +Flood web UI/API and connects to an external torrent service. It does not bundle +or start rTorrent. The Dockerfile uses the v4.7 npm lockfile and builds client +assets; changing release families may require updating the build tooling. Set Actions secrets `DOCKER_USERNAME` and `DOCKER_TOKEN` with Docker Hub write access to `k2patel/floodui`. Builds run remotely on the Kubernetes runner for