aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian <[email protected]>2026-02-02 15:53:57 -0600
committerChristian <[email protected]>2026-02-02 15:53:57 -0600
commitf4dde3803de5a9e6093ff1b327a9e582096f807d (patch)
treec4f6e9eac542d91ead0b9938a26f5342584061af
parent4f12e4ca91d5042b2290ef763a012544e43e0583 (diff)
Allow changing title and subtitleHEADmain
-rw-r--r--Dockerfile9
-rw-r--r--cgitrc.template (renamed from cgitrc)6
-rwxr-xr-xentrypoint.sh8
3 files changed, 20 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 0316d5d..8a17307 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,6 +2,9 @@ FROM alpine
WORKDIR /root
COPY Caddyfile .
COPY supervisord.conf .
-COPY cgitrc /etc/
-RUN apk add --no-cache cgit git caddy fcgiwrap supervisor py3-markdown py3-pygments
-ENTRYPOINT supervisord -c supervisord.conf
+COPY entrypoint.sh .
+COPY cgitrc.template /etc/
+RUN apk add --no-cache cgit git caddy fcgiwrap supervisor py3-markdown py3-pygments envsubst; \
+ envsubst < /etc/cgitrc.template > /etc/cgitrc
+CMD ["supervisord", "-c", "supervisord.conf"]
+ENTRYPOINT ["./entrypoint.sh"]
diff --git a/cgitrc b/cgitrc.template
index b35d83c..506f53e 100644
--- a/cgitrc
+++ b/cgitrc.template
@@ -1,3 +1,9 @@
+# Set the title and heading of the repository index page
+root-title=$CGIT_TITLE
+
+# Set a subheading for the repository index page
+root-desc=$CGIT_SUBTITLE
+
# Highlight source code with python pygments-based highlighter
source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100755
index 0000000..9acff7c
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -eu
+
+echo "Generating cgitrc..."
+envsubst < /etc/cgitrc.template > /etc/cgitrc
+
+echo "Starting application..."
+exec "$@"