diff options
| author | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-05-17 17:21:55 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-05-17 17:21:55 +0900 |
| commit | edb99c9da2198482345a1c3fc9f24a115d0aa62a (patch) | |
| tree | c8a1fff2dfb5016526c92a3a19d5d2f8e3f3249c | |
| parent | 7e8e89ef2e2b2302c92e03429e43be9b1db08d49 (diff) | |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rw-r--r-- | cgit/Dockerfile | 5 | ||||
| -rw-r--r-- | cgit/docker-compose.yml | 2 | ||||
| -rw-r--r-- | cgit/lighttpd.conf | 14 |
3 files changed, 20 insertions, 1 deletions
diff --git a/cgit/Dockerfile b/cgit/Dockerfile new file mode 100644 index 0000000..dabdfd7 --- /dev/null +++ b/cgit/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3.19 +RUN apk add --no-cache cgit lighttpd highlight +COPY lighttpd.conf /etc/lighttpd/lighttpd.conf +EXPOSE 80 +CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] diff --git a/cgit/docker-compose.yml b/cgit/docker-compose.yml index 5e59177..a93aa22 100644 --- a/cgit/docker-compose.yml +++ b/cgit/docker-compose.yml @@ -1,6 +1,6 @@ services: cgit: - image: klakegg/cgit:alpine + build: . container_name: cgit volumes: - ./cgitrc:/etc/cgitrc:ro diff --git a/cgit/lighttpd.conf b/cgit/lighttpd.conf new file mode 100644 index 0000000..bdc295b --- /dev/null +++ b/cgit/lighttpd.conf @@ -0,0 +1,14 @@ +server.document-root = "/usr/share/webapps/cgit" +server.port = 80 + +server.modules = ( + "mod_cgi", + "mod_rewrite", +) + +index-file.names = ("cgit.cgi") +cgi.assign = (".cgi" => "") + +url.rewrite-once = ( + "^(/[^?]*)(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" +) |
