gogs.service 787 B

123456789101112131415161718192021222324252627282930
  1. [Unit]
  2. Description=Gogs
  3. After=syslog.target
  4. After=network.target
  5. After=mariadb.service mysqld.service postgresql.service memcached.service redis.service
  6. [Service]
  7. # Modify these two values and uncomment them if you have
  8. # repos with lots of files and get an HTTP error 500 because
  9. # of that
  10. ###
  11. #LimitMEMLOCK=infinity
  12. #LimitNOFILE=65535
  13. Type=simple
  14. User=git
  15. Group=git
  16. WorkingDirectory=/home/git/gogs
  17. ExecStart=/home/git/gogs/gogs web
  18. Restart=always
  19. Environment=USER=git HOME=/home/git
  20. # Some distributions may not support these hardening directives. If you cannot start the service due
  21. # to an unknown option, comment out the ones not supported by your version of systemd.
  22. ProtectSystem=full
  23. PrivateDevices=yes
  24. PrivateTmp=yes
  25. NoNewPrivileges=true
  26. [Install]
  27. WantedBy=multi-user.target