clone

a personal forge on plain git: static pages, stacked-diff reviews, signed local ci, repo sites and releases

Run a pinned Caddy 2.11 in the container #7

7 files changed, +30 -17
MDockerfile18+++++++++++++++++-
MREADME.md4+++-
Mserver/container/start.sh5+++--
Mtest/container.sh8++++----
Mtest/scenarios/private-web-caddy.sh2+-
Mtest/scenarios/private-web-clone.sh2+-
Mtest/scenarios/release-caddy.sh8+-------
M Dockerfile +17 -1
@@ -17,21 +17,37 @@ RUN CGO_ENABLED=0 GOBIN=/out go install github.com/rclone/rclone@v1.75.2
1717 FROM golang:1.27.2 AS litestream1818 RUN CGO_ENABLED=0 GOBIN=/out go install github.com/benbjohnson/litestream/cmd/litestream@v0.5.171919 20+# Caddy serves pages, sites and HTTPS clones. Debian's is 2.6, from 2022, and21+# the edge runs 2.11 (Alpine's, deploy/edge), so build a pinned release of22+# the same line, checked the same way. Built as Caddy's own releases are23+# (trimmed paths, no symbol table: a third smaller); a build of Caddy's own24+# module can't read its version, so caddy version is told it (CustomVersion).25+FROM golang:1.27.2 AS caddy26+RUN v=v2.11.7 && CGO_ENABLED=0 GOBIN=/out go install -trimpath \27+ -ldflags "-s -w -X github.com/caddyserver/caddy/v2.CustomVersion=$v" \28+ github.com/caddyserver/caddy/v2/cmd/caddy@$v29+2030 # Node runs the TypeScript sources directly (type stripping). 24 is the LTS2131 # whose WebCrypto has ML-DSA (24.7 and later), so passkeys can be2232 # post-quantum; the forge itself needs 22.18 or later.2333 FROM node:24-trixie-slim2434 35+# Caddy gets the system user Debian's package would make, in the git group36+# to read pages and repos. media-types is /etc/mime.types, the content37+# types Caddy sends for files beyond the few Go knows itself.2538 RUN apt-get update \26- && apt-get install -y --no-install-recommends git openssh-server caddy ca-certificates tini fcgiwrap restic \39+ && apt-get install -y --no-install-recommends git openssh-server ca-certificates tini fcgiwrap restic media-types \2740 && rm -rf /var/lib/apt/lists/* \2841 && adduser --system --group --shell /bin/sh --home /srv/git git \42+ && adduser --system --group --shell /usr/sbin/nologin --home /var/lib/caddy --gecos 'Caddy web server' caddy \2943 && usermod -aG git caddy \44+ && mkdir -p /etc/caddy \3045 && rm -f /etc/ssh/ssh_host_*3146 3247 COPY --from=tailcat /out/tailcat /usr/local/bin/tailcat3348 COPY --from=rclone /out/rclone /usr/local/bin/rclone3449 COPY --from=litestream /out/litestream /usr/local/bin/litestream50+COPY --from=caddy /out/caddy /usr/local/bin/caddy3551 COPY server/container/sshd.conf /etc/ssh/sshd_config.d/forge.conf3652 3753 WORKDIR /opt/forge
M README.md +3 -1
M server/container/start.sh +3 -2
M test/container.sh +4 -4
M test/scenarios/private-web-caddy.sh +1 -1
M test/scenarios/private-web-clone.sh +1 -1
M test/scenarios/release-caddy.sh +1 -7