- We can rebrand this quite safely, as only new installations would likely look into this file and configure the correct folders(to use forgejo instead of gitea).
Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/137
(cherry picked from commit fa78e52b5d)
(cherry picked from commit e36d649989)
(cherry picked from commit 37e15a2f41)
(cherry picked from commit a09a4b3ce0)
(cherry picked from commit 10615fca8e)
(cherry picked from commit f765a10fd3)
(cherry picked from commit 2b1b539d2c)
(cherry picked from commit df4250b6a8)
(cherry picked from commit ba499fc092)
* Comment on PrivateUsers option for gitea.service
A user happens to encounter an issue where PrivateUsers sandboxed Gitea.service and it effectively stop systemd from applying capabilities for that gitea.service. I am opening this PR to provide comments on PrivateUsers, effectively a tiny FAQ information for end-user.
`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>
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#15866
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
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>
* 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'
* 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>
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.