1
0

gogs.service 795 B

123456789101112131415161718192021222324252627282930
  1. [Unit]
  2. Description=Gogs
  3. After=network.target
  4. After=mariadb.service mysql.service mysqld.service postgresql.service memcached.service redis.service
  5. [Service]
  6. # Modify these two values and uncomment them if you have
  7. # repos with lots of files and get an HTTP error 500 because
  8. # of that
  9. ###
  10. #LimitMEMLOCK=infinity
  11. #LimitNOFILE=65535
  12. Type=simple
  13. User=git
  14. Group=git
  15. WorkingDirectory=/home/git/gogs
  16. ExecStart=/home/git/gogs/gogs web
  17. Restart=always
  18. RestartSec=2s
  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