coreos-home-server/config/service/git/systemd/git-daemon.service
Alex Palaistras 576ded0eee git: Add static site generation, read-only access
This commit extends the pre-existing `git` service with static HTML
generation for public repositories (i.e. repositories placed under the
`public` directory), which can then be served via existing mechanisms.

In support of these changes, public repositories can be made available
for cloning via the `git://` protocol, which listens on port 9418 by
default. Only public repositories will be considered, and user access
has been set up to ensure that private repositories are not made
accessible by accident.
2021-12-06 11:58:01 +00:00

23 lines
713 B
Desktop File

[Unit]
Description=Git Server via Daemon
Wants=git.service
After=git.service
[Service]
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
--user git-public --entrypoint git \
--publish 9418:9418 \
--volume git:/var/lib/git:z,ro \
localhost/git:latest daemon \
--verbose --export-all --base-path=/var/lib/git/public
ExecStop=/bin/podman stop --ignore --time 10 %N
ExecStopPost=/bin/podman rm --ignore --force %N
[Install]
WantedBy=multi-user.target