From efac56ba7606c0901c6ace55904c117c839d2646 Mon Sep 17 00:00:00 2001 From: "Archimedes (Paperclip)" Date: Tue, 24 Nov 2026 12:32:22 +0000 Subject: [PATCH] =?UTF-8?q?ci(image):=20leere=20config/docker.json=20f?= =?UTF-8?q?=C3=BCr=20Upstream-Dockerfile=20anlegen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Das Upstream-Dockerfile kopiert die gitignorierte config/docker.json und bricht ohne sie ab. Lokal verifiziert: Build mit {} erfolgreich. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/image.yml | 7 +++++++ FORK.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.gitea/workflows/image.yml b/.gitea/workflows/image.yml index 6505e97d..c1992355 100644 --- a/.gitea/workflows/image.yml +++ b/.gitea/workflows/image.yml @@ -72,6 +72,13 @@ jobs: } >> "$GITHUB_OUTPUT" echo "Tags: ${names}" + # Das Upstream-Dockerfile kopiert config/docker.json (gitignoriert) und bricht ohne + # sie ab. Leeres Objekt statt echter Werte: Konfiguration kommt zur Laufzeit über + # Env-Variablen (nconf: argv > env > config/docker.json > config/default.json) oder + # eine gemountete config/docker.json. So landen keine Secrets im Image. + - name: Leere config/docker.json für das Upstream-Dockerfile + run: test -e config/docker.json || echo '{}' > config/docker.json + - uses: docker/setup-buildx-action@v4 - uses: docker/login-action@v4 diff --git a/FORK.md b/FORK.md index 6f646b91..f3b75a47 100644 --- a/FORK.md +++ b/FORK.md @@ -79,6 +79,13 @@ merges remain conflict-free. | `ci.yml` | pull requests, push to `main` | `npm ci` (includes the Vite build via `postinstall`), `npm run lint:dry`, `npm run stylelint:dry`, `npm test`. Upstream currently has ESLint warnings but no errors; warnings do not fail the job. The tests need no MongoDB. | | `image.yml` | push to `main`, tags `v*`, manual | builds the unchanged upstream `Dockerfile` and pushes `git.morlana.online/f.weber/homebrewery-oidc` | +The upstream `Dockerfile` copies the git-ignored `config/docker.json` and fails without +it. `image.yml` therefore creates it as `{}` before building, so no configuration or +secret is baked into the image. Configure the container at runtime through environment +variables (for example `MONGODB_URI`, `NODE_ENV=docker` is preset) or by mounting +`config/docker.json`; `server/config.js` reads argv, then env, then that file, then +`config/default.json`. The container exits if MongoDB is unreachable. + Image tags: | Event | Tags |