Commit Graph
4 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 5.5 02354506e7 fix(web-app-hugo): build as the image's own user
The builder stage switched to root for everything, so npm lifecycle
scripts of the site's dependencies and the Hugo build ran as root.

The official image runs as hugo and ships Node and npm. Root now only
creates /src and /public for that user. npm install and the build run
as hugo, and the apk install of nodejs and npm is gone.

The README no longer repeats the pinned source tag, which the updater
moves in meta/services.yml only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 21:11:48 +02:00
kevinveenbirkenbachandClaude Opus 5.5 f9e25b0387 fix(web-app-hugo): build with the official Hugo image
The update moved the documentation source to v0.165.0 and the builder to
hugomods/hugo:exts-0.154.5. That is the newest tag hugomods publishes, and
the source of v0.165.0 does not render with it. The image build ended with
"can't evaluate field Locale in type *langs.Language" in
layouts/baseof.html.

The builder is now ghcr.io/gohugoio/hugo, which Hugo publishes for every
release, pinned to v0.165.0 like the source. That image runs as an
unprivileged user, so the build stage switches to root for the steps that
write to /src and /public.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 16:40:40 +02:00
kevinveenbirkenbachandClaude Opus 5 5137465c6f style: delete every comment the comments-valid policy rejects
3529 invalid comments in 528 files, grandfathered in while the linter
only saw the working-tree diff. Removal ran through the linter's own
collectors, so detection and deletion cannot drift: a comment whose
opener line is blank before it and whose closer line is blank after it
loses all its lines, anything else loses only the comment region, and a
line left holding a bare delimiter goes with it.

Five files keep their comments behind a nocheck marker instead. Four are
upstream configs whose inline docs are upstream's own (mautrix, systemd
journald, nextcloud-oidc-login, MediaWiki). In littlejs the
commented-out entries ARE the deactivation mechanism for an example
tile, so deleting them would delete configuration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 03:22:02 +02:00
kevinveenbirkenbachandClaude Opus 4.7 ef13086164 feat(req-016): add web-app-hugo role for static-site hosting
Implements requirement 016: a `web-app-hugo` role that builds and
serves Hugo static sites via a multi-stage Dockerfile (extended Hugo
builder + nginx serve), modeled on `web-app-littlejs` (no DB, single
canonical domain, sys-stk-full + docker_git_repository_* for the
upstream content clone).

Default content source is the official Hugo documentation
(`gohugoio/hugoDocs` pinned to tag `v0.148.0`, commit
36e3d7b7b521a165bdbf8f63cd417720f37832c6) so a fresh deploy renders
a real Hugo site end-to-end. Content repo and ref are
inventory-overridable via `services.hugo.source_repository` /
`services.hugo.source_version`; build env (`hugo_environment`,
`hugo_minify`) are overridable too. `--baseURL` is derived from
`lookup('tls', application_id, 'url.base')`.

Validated end-to-end on the local stack:
- `make deploy-fresh-purged-apps APPS=web-app-hugo FULL_CYCLE=true`
  succeeds (`failed=0`).
- Container `infinito-hugo` reports `Up (healthy)` on the wget
  healthcheck.
- `https://hugo.infinito.example/` serves the rendered hugoDocs
  homepage with HSTS + CSP headers.
- All three Playwright assertions (front-page reachability + HSTS,
  CSP header present, non-empty title with Hugo content sentinel)
  pass under the deploy-time `test-e2e-playwright` runner.
- Second `deploy-reuse-kept-apps` is idempotent: git pull reports
  `changed: false`, no compose-build / compose-up handler fires.

V1 explicitly supports a single canonical domain — asserted in
`tasks/01_core.yml`. Multi-canonical-domain support is out of scope
and deferred to a follow-up. Theme is whatever the upstream content
repo bundles (themes/ or go.mod / Hugo Modules); a separate theme
override is also a follow-up.

The Dockerfile installs Node.js + npm in the builder stage and runs
`npm install` when the upstream repo ships a `package.json` —
hugoDocs uses Hugo's JS pipeline with `import 'alpinejs'`, which
requires `node_modules/`. Skipped silently when no `package.json` is
present, so a custom site without JS deps builds unchanged.

Allocations: local HTTP port 8008 (via
`cli meta ports suggest --scope local --category http`); local
subnet 192.168.102.240/28 (via `cli meta networks suggest --clients 8`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 21:57:55 +02:00