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.

68 lines
1.6 KiB

8 years ago
  1. [Unit]
  2. Description=Gitea (Git with a cup of tea)
  3. After=syslog.target
  4. After=network.target
  5. ###
  6. # Don't forget to add the database service requirements
  7. ###
  8. #
  9. #Requires=mysql.service
  10. #Requires=mariadb.service
  11. #Requires=postgresql.service
  12. #Requires=memcached.service
  13. #Requires=redis.service
  14. #
  15. ###
  16. # If using socket activation for main http/s
  17. ###
  18. #
  19. #After=gitea.main.socket
  20. #Requires=gitea.main.socket
  21. #
  22. ###
  23. # (You can also provide gitea an http fallback and/or ssh socket too)
  24. #
  25. # An example of /etc/systemd/system/gitea.main.socket
  26. ###
  27. ##
  28. ## [Unit]
  29. ## Description=Gitea Web Socket
  30. ## PartOf=gitea.service
  31. ##
  32. ## [Socket]
  33. ## Service=gitea.service
  34. ## ListenStream=<some_port>
  35. ## NoDelay=true
  36. ##
  37. ## [Install]
  38. ## WantedBy=sockets.target
  39. ##
  40. ###
  41. [Service]
  42. # Modify these two values and uncomment them if you have
  43. # repos with lots of files and get an HTTP error 500 because
  44. # of that
  45. ###
  46. #LimitMEMLOCK=infinity
  47. #LimitNOFILE=65535
  48. RestartSec=2s
  49. Type=simple
  50. User=git
  51. Group=git
  52. WorkingDirectory=/var/lib/gitea/
  53. # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file
  54. # (manually creating /run/gitea doesn't work, because it would not persist across reboots)
  55. #RuntimeDirectory=gitea
  56. ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
  57. Restart=always
  58. Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
  59. # If you want to bind Gitea to a port below 1024, uncomment
  60. # the two values below, or use socket activation to pass Gitea its ports as above
  61. ###
  62. #CapabilityBoundingSet=CAP_NET_BIND_SERVICE
  63. #AmbientCapabilities=CAP_NET_BIND_SERVICE
  64. ###
  65. [Install]
  66. WantedBy=multi-user.target