From 00dffa8cf5cac8322cb47f2222e424d3960e7939 Mon Sep 17 00:00:00 2001 From: RATDAD Date: Sat, 13 Dec 2025 21:00:08 -0500 Subject: Added Git Smart HTTP Support --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2b82c84..60bbc55 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,21 @@ You can optionally run with HTTP Basic Auth with these options. docker run --name cgit -d -p 80:80 -v git/repo/location:/srv/git -e HTTP_AUTH_PASSWORD=pass HTTP_AUTH_USER=user ``` +## Docker Build +```bash +# Push-only +docker build --build-arg GIT_HTTP_MODE=w -t cgit:push-only . + +# Full RW +docker build --build-arg GIT_HTTP_MODE=rw -t cgit:rw . + +# Read-only +docker build --build-arg GIT_HTTP_MODE=ro -t cgit:ro . + +# No Git HTTP at all +docker build --build-arg GIT_HTTP_MODE=off -t cgit:no-http . +``` + ## Docker Compose You can use Docker Compose to create an instance of the server. ```yaml @@ -53,4 +68,3 @@ This container runs Apache Web Server. I made this decision because it's one of **To configure**, just mount your custom `httpd.conf` to `/etc/httpd/conf/httpd.conf` inside the container. Just keep in mind that cgit is compiled to serve its files in `/srv/www/htdocs/cgit/` and not the default location of `/var/www/htdocs/cgit/` as the documentation states. This is a decision I made deliberately because `/srv/` is where server files should go. - -- cgit v1.2.3-70-g09d2