24 lines
575 B
Django/Jinja
24 lines
575 B
Django/Jinja
# Example at https://github.com/go-gitea/gitea/blob/main/contrib/systemd/gitea.service
|
|
[Unit]
|
|
Description=Gitea (Git with a cup of tea)
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
LimitNOFILE=524288:524288
|
|
RestartSec=2s
|
|
Type=simple
|
|
User={{ gitea_user }}
|
|
Group={{ gitea_group }}
|
|
WorkingDirectory={{ gitea_home }}
|
|
#
|
|
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/gitea.ini
|
|
Restart=always
|
|
#
|
|
{% if gitea_systemd_cap_net_bind_service %}
|
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
{% endif %}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |