Commit Graph

12 Commits

Author SHA1 Message Date
silverwind 4c3e56da13
Use Wants= over Requires= in systemd file ()
`Requires=` has the behaviour of stopping `gitea.service` when the
database is stopped but not bringing it up again after the database is
started again. Use `Wants=` to define a weak requirement instead,
meaning `gitea.service` will be kept running when the database is
stopped, which is not an issue because gitea will just reconnect later
on.

Fixes: https://github.com/go-gitea/gitea/issues/15866

Co-authored-by: zeripath <art27@cantab.net>
2021-05-17 16:09:15 +03:00
zeripath 3a04d6f43f
Systemd needs After as well as Require ()
If the gitea service is stopped because of the db going down
it needs an `After=db.service` to ensure it is restarted in
addition to the `Requires=db.service` to ensure that the db
is started before gitea is started.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-05-16 16:41:37 +08:00
Bagas Sanjaya eab5837142
systemd service: Add commented PATH environment option for Git prefix ()
On some setups, Git is installed to directory prefix other than default
PATH (such as /opt/git/bin). For Gitea to know such Git installations,
PATH environment must be specified on service file.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-24 17:13:59 -04:00
Anthony Vanelverdinghe 44ec9b933a Rephrase comment about RuntimeDirectory option () 2019-11-10 11:49:39 -05:00
Ramon Fischer 2282c659dd Explicity indicate the socket unit to use the service unit "gitea.service" ()
* rename socket file, make example more precise, use long parameter name

* correct path

* use the correct path to the configuration file according to the documentation

* rename the socket unit back to 'gitea.main.socket', explicitly indicate that the socket unit should use the service file 'gitea.service'
2019-11-04 12:42:30 +08:00
zeripath 0b44f0c465
Update the provided gitea.service to mention socket activation ()
* Update the provided gitea.service since we have graceful restarting again

* Update contrib/systemd/gitea.service

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-10-16 08:29:50 +01:00
Thomas McWork bc5a479fef Add unix socket help ()
When using unix socket as listener (`HTTP_ADDR = /run/gitea/gitea.socket`) then it's required to have the folder `/run/gitea` with appropriate owner/group. Manual creation leads to vanishing after reboot. This directive enables Systemd to handle this.
2019-10-06 14:32:23 -04:00
techknowlogick dbb4aeead9
Change systemd service file to more correctly match Debian & Centos - Fix () 2019-01-19 23:55:39 -05:00
Lauris BH 1aee261aae More detailed documentation on how to set up from binary ()
* More detailed documentation on how to set up from binary
Also change recommended file locations
2018-06-04 22:02:04 -04:00
techknowlogick af62ec5cc0 Note about adding permisions to binary ()
in regards to binding to lower ports than 1024
2018-05-10 16:32:01 +08:00
William Mantly Jr e4f96c60cd App restarts to quickly if it fails to start. () 2017-11-21 01:37:23 +02:00
Thomas Boerger a06c3ad2c0 Synced gitignores with github repo ()
* Renamed scripts directory into contrib

* Added script to download gitignores from github

* Synced gitignores with github repo
2017-03-15 13:30:00 +01:00