summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRATDAD <lambda@disroot.org>2025-12-13 21:00:08 -0500
committerRATDAD <lambda@disroot.org>2025-12-13 21:00:08 -0500
commit00dffa8cf5cac8322cb47f2222e424d3960e7939 (patch)
tree7db0460694037b063f97058ecb9eb664b6162b45 /README.md
parentde8d06726cae205ead43f8b1ac07ecc59a07363b (diff)
downloadcgit-docker-00dffa8cf5cac8322cb47f2222e424d3960e7939.tar.gz
cgit-docker-00dffa8cf5cac8322cb47f2222e424d3960e7939.tar.bz2
cgit-docker-00dffa8cf5cac8322cb47f2222e424d3960e7939.zip
Added Git Smart HTTP Support
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 15 insertions, 1 deletions
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.
-