Przeglądaj źródła

Add 'gogs/gogs.service'

Added systemd Unit-file
Michael Honkoop 8 miesięcy temu
rodzic
commit
4c2feea0fb
1 zmienionych plików z 25 dodań i 0 usunięć
  1. 25 0
      gogs/gogs.service

+ 25 - 0
gogs/gogs.service

@@ -0,0 +1,25 @@
+[Unit]
+Description=Gogs
+After=syslog.target
+After=network.target
+After=mariadb.service
+
+[Service]
+Type=simple
+User=git
+Group=git
+WorkingDirectory=/opt/gogs
+ExecStart=/opt/gogs/gogs web
+Restart=always
+Environment=USER=git HOME=/opt/gogs
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+# Some distributions may not support these hardening directives. If you cannot start th>
+# to an unknown option, comment out the ones not supported by your version of systemd.
+#ProtectSystem=full
+#PrivateDevices=yes
+PrivateTmp=yes
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target