Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

87 lignes
2.4 KiB

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