| tar xz \
&& cd git-${GIT_VERSION} \
&& make -j$(nproc) prefix=/usr/local NO_TCLTK=1 NO_GETTEXT= \
- && make prefix=/usr/local install
+ && make prefix=/usr/local install \
+ && make -j$(nproc) prefix=/usr/local NO_TCLTK=1 NO_GETTEXT= gitweb \
+ && make prefix=/usr/local install-gitweb
+# TODO(vys): remove gitweb build when quire serve has its own web view
# Cargo-chef stage for dependency caching.
FROM rust:1.88-trixie AS chef
ca-certificates \
libcurl4 \
libexpat1 \
+ lighttpd \
+ perl \
&& rm -rf /var/lib/apt/lists/*
+# TODO(vys): lighttpd and perl are interim deps for gitweb; remove both
+# when quire serve has its own web view.
COPY --from=git-builder /usr/local/bin/git /usr/local/bin/git
COPY --from=git-builder /usr/local/libexec/git-core/ /usr/local/libexec/git-core/
+COPY --from=git-builder /usr/local/share/gitweb/ /usr/local/share/gitweb/
+# TODO(vys): remove the gitweb COPY above with gitweb
COPY --from=builder /build/quire /usr/local/bin/quire
# Configure git hooks globally so all repos inherit the post-receive dispatch.
WORKDIR /var/quire
-ENTRYPOINT ["quire"]
-CMD ["serve"]
+# TODO(vys): everything below is interim gitweb scaffolding — remove when
+# quire serve has its own web view. Restore ENTRYPOINT ["quire"] / CMD ["serve"].
+COPY conf/gitweb.conf /etc/gitweb.conf
+COPY conf/lighttpd.conf /etc/lighttpd/lighttpd.conf
+
+EXPOSE 8080
+ENTRYPOINT ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
--- /dev/null
+# Interim gitweb config — remove when quire serve has its own web view.
+# See TODO(vys) in the Dockerfile.
+
+our $projectroot = "/var/quire/repos";
+
+our $feature{'blame'}{'default'} = [1];
+our $feature{'highlight'}{'default'} = [1];
--- /dev/null
+# Interim lighttpd config — remove when quire serve has its own web view.
+# See TODO(vys) in the Dockerfile.
+
+server.document-root = "/usr/local/share/gitweb"
+server.port = 8080
+server.modules = ("mod_cgi")
+
+# Write runtime files to /tmp since the container runs as a non-root user.
+server.pid-file = "/tmp/lighttpd.pid"
+server.errorlog = "/tmp/lighttpd-error.log"
+
+index-file.names = ("gitweb.cgi")
+cgi.assign = (".cgi" => "")
--user "$(id -u git):$(id -g git)" \
-e HOME=/tmp \
-v /var/quire:/var/quire \
- -p 127.0.0.1:3000:3000 \
+ -p 127.0.0.1:8080:8080 \
quire
In a compose file, the equivalent is `user: "${QUIRE_UID}:${QUIRE_GID}"`
uid has no `/etc/passwd` entry inside the container, and git needs a
writable `HOME` for its config probing.
-The HTTP port (3000) is published to host loopback only. A reverse proxy
+The HTTP port (8080) is published to host loopback only. A reverse proxy
on the host terminates TLS and reverse-proxies to it; nothing else
should reach it directly.
+
+Currently the container runs lighttpd + gitweb as an interim web view.
+This will be replaced by `quire serve` once the built-in web view is ready.