0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 15:53:07 -05:00

Merge pull request #1853 from andreynering/windows-service

Adding simple script to install Gogs as a Windows service.
This commit is contained in:
无闻 2015-10-29 13:20:27 -04:00
commit 31b375782b

View file

@ -0,0 +1,25 @@
@ECHO off
:: This script relies on nssm.exe to work.
:: Please, download it and make it available on the system path,
:: or copy it to the gogs path.
:: https://nssm.cc/download
:: This script itself should run in the gogs path, too.
:: In case of startup failure, please read carefully the log file.
:: Make sure Gogs work running manually with "gogs web" before running
:: this script.
:: And, please, read carefully the installation docs first:
:: http://gogs.io/docs/installation
:: To unistall the service, run "nssm remove gogs" and restart Windows.
:: Set the folder where you extracted Gogs. Omit the last slash.
SET gogspath=C:\gogs
nssm install gogs "%gogspath%\gogs.exe"
nssm set gogs AppParameters "web"
nssm set gogs Description "A painless self-hosted Git service."
nssm set gogs DisplayName "Gogs - Go Git Service"
nssm set gogs Start SERVICE_DELAYED_AUTO_START
nssm set gogs AppStdout "%gogspath%\gogs.log"
nssm start gogs
pause