Skip to content

Instantly share code, notes, and snippets.

@aspann
Created October 21, 2017 20:56
Show Gist options
  • Select an option

  • Save aspann/d19773ce6e98a3911fb54dd0cbff7f6f to your computer and use it in GitHub Desktop.

Select an option

Save aspann/d19773ce6e98a3911fb54dd0cbff7f6f to your computer and use it in GitHub Desktop.
SystemD - gogs.service
[Unit]
Description=Gogs a Go Git Service
After=network.target
After=mysqld.service
[Service]
User=git
Group=git
PermissionsStartOnly=true
WorkingDirectory=/home/git/gogs
ExecStartPre=-/sbin/setcap CAP_NET_BIND_SERVICE=+eip /home/git/go/src/github.com/gogits/gogs/gogs
ExecStart=/home/git/gogs/gogs web
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment