From bb6bc2387d58c737dbf92e73f8544bf39319dbd8 Mon Sep 17 00:00:00 2001 From: Lena Date: Sat, 1 Aug 2026 00:00:00 +0000 Subject: Enter git-forge A small self-hosted git forge: HTTP push and pull, cgit browsing, local and OIDC accounts, TOTP, scoped push tokens, per-repo permissions, issues, a wiki, and outbound mail. It does not reimplement git. git-http-backend and cgit run as CGI behind its own listener, which authorises every request before exec'ing either. One binary, one data directory, one listener: no database, no JavaScript, and state is JSON in a git repo with a working tree. --- git-forge.initd | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 git-forge.initd (limited to 'git-forge.initd') diff --git a/git-forge.initd b/git-forge.initd new file mode 100755 index 0000000..25c0cfd --- /dev/null +++ b/git-forge.initd @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# OpenRC service for git-forge. Install as /etc/init.d/git-forge with a +# forge user present; secrets and overrides go in /etc/conf.d/git-forge, +# mode 0600, as VAR=value lines. + +description="git-forge" +datadir="${GIT_FORGE_DATADIR:-/var/lib/git-forge}" +command=/usr/local/bin/git-forge +command_args="-datadir $datadir" +command_user="forge:forge" +command_background=yes +pidfile=/run/git-forge.pid +output_log=/var/log/git-forge.log +error_log=/var/log/git-forge.log + +depend() { + need net +} + +start_pre() { + checkpath -d -m 0700 -o forge:forge "$datadir" +} -- cgit v1.2.3