diff options
Diffstat (limited to 'cgit')
| -rw-r--r-- | cgit/Dockerfile | 5 | ||||
| -rw-r--r-- | cgit/deploy.sh | 2 | ||||
| -rw-r--r-- | cgit/docker-compose.yml | 2 | ||||
| -rw-r--r-- | cgit/lighttpd.conf | 15 |
4 files changed, 22 insertions, 2 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/deploy.sh b/cgit/deploy.sh index f8b3f40..276b188 100644 --- a/cgit/deploy.sh +++ b/cgit/deploy.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" -docker compose up -d +docker compose up -d --build 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..1ce38cc --- /dev/null +++ b/cgit/lighttpd.conf @@ -0,0 +1,15 @@ +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\.css|cgit\.js|cgit\.png|cgit-favicon\.png)$" => "/$1", + "^(/[^?]*)(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" +) |
