2024-01-05 23:03:42 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Gitea (Git with a cup of tea)
|
|
|
|
After=syslog.target
|
|
|
|
After=network.target
|
|
|
|
After=mysqld.service
|
|
|
|
After=postgresql.service
|
|
|
|
After=memcached.service
|
|
|
|
After=redis.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
User=gitea
|
|
|
|
Group=gitea
|
|
|
|
Type=simple
|
|
|
|
WorkingDirectory=~
|
|
|
|
RuntimeDirectory=gitea
|
|
|
|
LogsDirectory=gitea
|
|
|
|
StateDirectory=gitea
|
|
|
|
Environment=USER=gitea HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea
|
|
|
|
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
|
|
|
|
Restart=always
|
|
|
|
RestartSec=2s
|
|
|
|
ReadWritePaths=/etc/gitea/app.ini
|
|
|
|
AmbientCapabilities=
|
|
|
|
CapabilityBoundingSet=
|
|
|
|
LockPersonality=true
|
|
|
|
#Required by commit search
|
|
|
|
#MemoryDenyWriteExecute=true
|
|
|
|
NoNewPrivileges=True
|
|
|
|
#SecureBits=noroot-locked
|
|
|
|
PrivateDevices=true
|
|
|
|
PrivateTmp=true
|
|
|
|
PrivateUsers=true
|
|
|
|
ProtectClock=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
ProtectHome=true
|
|
|
|
ProtectHostname=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectProc=invisible
|
2024-01-05 23:04:10 +01:00
|
|
|
#ProtectSystem=strict
|
2024-01-05 23:03:42 +01:00
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
|
|
|
|
RestrictNamespaces=true
|
|
|
|
RestrictRealtime=true
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallFilter=@system-service
|
|
|
|
SystemCallErrorNumber=EPERM
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|