coreos-home-server/config/service/git/systemd/git.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
852 B
Desktop File

[Unit]
Description=Git Server via SSH
Wants=container-build@%N.service container-volume@%N.service container-volume@%N-serve.service
After=container-build@%N.service container-volume@%N.service container-volume@%N-serve.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 --cap-add AUDIT_WRITE \
--publish 468:22 \
--volume %N:/var/lib/git:z \
--volume %N-serve:/var/lib/git-serve:z \
--volume %N-ssh:/etc/ssh/keys:z \
localhost/%N:latest
ExecStop=/bin/podman stop --ignore --time 10 %N
ExecStopPost=/bin/podman rm --ignore --force %N
[Install]
WantedBy=multi-user.target