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 |