You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gitea.service 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [Unit]
  2. Description=Gitea (Git with a cup of tea)
  3. After=network.target
  4. ###
  5. # Don't forget to add the database service dependencies
  6. ###
  7. #
  8. #Wants=mysql.service
  9. #After=mysql.service
  10. #
  11. #Wants=mariadb.service
  12. #After=mariadb.service
  13. #
  14. #Wants=postgresql.service
  15. #After=postgresql.service
  16. #
  17. #Wants=memcached.service
  18. #After=memcached.service
  19. #
  20. #Wants=redis.service
  21. #After=redis.service
  22. #
  23. ###
  24. # If using socket activation for main http/s
  25. ###
  26. #
  27. #After=gitea.main.socket
  28. #Requires=gitea.main.socket
  29. #
  30. ###
  31. # (You can also provide gitea an http fallback and/or ssh socket too)
  32. #
  33. # An example of /etc/systemd/system/gitea.main.socket
  34. ###
  35. ##
  36. ## [Unit]
  37. ## Description=Gitea Web Socket
  38. ## PartOf=gitea.service
  39. ##
  40. ## [Socket]
  41. ## Service=gitea.service
  42. ## ListenStream=<some_port>
  43. ## NoDelay=true
  44. ##
  45. ## [Install]
  46. ## WantedBy=sockets.target
  47. ##
  48. ###
  49. [Service]
  50. # Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
  51. # LimitNOFILE=524288:524288
  52. RestartSec=2s
  53. Type=simple
  54. User=git
  55. Group=git
  56. WorkingDirectory=/var/lib/gitea/
  57. # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
  58. # (manually creating /run/gitea doesn't work, because it would not persist across reboots)
  59. #RuntimeDirectory=gitea
  60. ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
  61. Restart=always
  62. Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
  63. # If you install Git to directory prefix other than default PATH (which happens
  64. # for example if you install other versions of Git side-to-side with
  65. # distribution version), uncomment below line and add that prefix to PATH
  66. # Don't forget to place git-lfs binary on the PATH below if you want to enable
  67. # Git LFS support
  68. #Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin
  69. # If you want to bind Gitea to a port below 1024, uncomment
  70. # the two values below, or use socket activation to pass Gitea its ports as above
  71. ###
  72. #CapabilityBoundingSet=CAP_NET_BIND_SERVICE
  73. #AmbientCapabilities=CAP_NET_BIND_SERVICE
  74. ###
  75. # In some cases, when using CapabilityBoundingSet and AmbientCapabilities option, you may want to
  76. # set the following value to false to allow capabilities to be applied on gitea process. The following
  77. # value if set to true sandboxes gitea service and prevent any processes from running with privileges
  78. # in the host user namespace.
  79. ###
  80. #PrivateUsers=false
  81. ###
  82. [Install]
  83. WantedBy=multi-user.target