Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/ops/git/systemd/fcgiwrap@cgit.socket.d
diff options
context:
space:
mode:
authorLeitwolf112026-11-12 23:41:27 +0300
committerLeitwolf112026-11-12 23:41:27 +0300
commit83e0ad4586d90bf02c3a5bfeb1ab92fd90e51703 (patch)
tree41c12c9a54223df2d681554679408307282319fd /ops/git/systemd/fcgiwrap@cgit.socket.d
parent80d46cbffc87da9bf2665935e563ab556c1a267d (diff)
downloadprogmaweb-83e0ad4586d90bf02c3a5bfeb1ab92fd90e51703.tar.gz
Add read-only Git mirrors on git.progmasoft.com
git.progmasoft.com shows the public repositories under development (tazel, tazelish, tazel.net, catch3, progmasoft-cpp, progmaweb, website) as read-only mirrors with cgit, and serves clones over smart HTTP, such as git clone https://git.progmasoft.com/tazel. GitHub stays where development happens; private and archived repositories are not mirrored. ops/git holds what runs on the server: - cgitrc, the header, footer and stylesheet: the look of progmasoft.com (its tokens, the four-tile brand with "Git" beside it, the dark footer), light like its default, no scripts, no rendered READMEs. - git-mirror.sh with git-mirror.service/.timer: every ten minutes, as gitmirror, branches and tags only from GitHub, pruned, the default branch followed, repacked with a bitmap when something changed. - fcgiwrap@cgit drop-ins: cgit and git-http-backend run as cgit with systemd sandboxing (no network, read-only system, exposure 0.7), on a socket only nginx can open. - selinux/progmasoft_cgit.te: fcgiwrap runs in httpd_t and the two CGIs move into git_script_t; the module allows only that move under the NoNewPrivileges that the sandboxing sets. - nginx/git.conf: HSTS, a content security policy without scripts, per-address request and connection limits, 403 for receive-pack and the dumb protocol, buffered clones, and the inline handlers of cgit's menus removed. ops/README.md describes the files, the labels, and why the name is not behind the Cloudflare proxy: through it a clone of catch3 never reached the client. Deployed and checked live: every page answers 200, unknown ones 404, full clones of tazel, progmaweb and catch3 work, a push answers 403, no SELinux denials, no console errors, no horizontal scroll at 390 px.
Diffstat (limited to 'ops/git/systemd/fcgiwrap@cgit.socket.d')
-rw-r--r--ops/git/systemd/fcgiwrap@cgit.socket.d/nginx.conf7
1 files changed, 7 insertions, 0 deletions
diff --git a/ops/git/systemd/fcgiwrap@cgit.socket.d/nginx.conf b/ops/git/systemd/fcgiwrap@cgit.socket.d/nginx.conf
new file mode 100644
index 0000000..51ce6de
--- /dev/null
+++ b/ops/git/systemd/fcgiwrap@cgit.socket.d/nginx.conf
@@ -0,0 +1,7 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+# Only Nginx reaches cgit and git-http-backend: the socket belongs to cgit and the group nginx.
+[Socket]
+SocketGroup=nginx
+SocketMode=0660