summarylogtreecommitdiffstats
path: root/gitea.service
diff options
context:
space:
mode:
Diffstat (limited to 'gitea.service')
-rw-r--r--gitea.service39
1 files changed, 39 insertions, 0 deletions
diff --git a/gitea.service b/gitea.service
new file mode 100644
index 000000000000..04b27030dc90
--- /dev/null
+++ b/gitea.service
@@ -0,0 +1,39 @@
+[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=git
+Group=git
+Type=simple
+WorkingDirectory=/var/lib/gitea
+RuntimeDirectory=gitea
+LogsDirectory=gitea
+Environment=USER=git HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea
+ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
+Restart=always
+RestartSec=2s
+CapabilityBoundingSet=
+NoNewPrivileges=True
+PrivateUsers=true
+PrivateDevices=true
+PrivateTmp=true
+ProtectHome=true
+ProtectSystem=strict
+ProtectControlGroups=yes
+ProtectKernelTunables=true
+ProtectKernelModules=yes
+ReadWritePaths=/etc/gitea/app.ini /var/lib/gitea
+LockPersonality=true
+MemoryDenyWriteExecute=true
+RestrictRealtime=true
+SystemCallArchitectures=native
+SystemCallFilter=@system-service
+
+[Install]
+WantedBy=multi-user.target