15 Commits (forgejo)

Author SHA1 Message Date
Gusted 37e15a2f41
[BRANDING] Rebrand systemd service (#137)
- 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 fa78e52b5d25556b4a4313c4ac78edf6306c5bbe)
(cherry picked from commit e36d649989a69a1761c3d7cc709f97f80c8d378a)
1 year ago
plsnp a99074b267
Update gitea.service (#21399)
`LimitMEMLOCK=infinity` is already the default, so removed that

Default soft limit for LimitNOFILE is 1024
Default hard limit for LimitNOFILE is 524288

`LimitNOFILE=65535` increases the soft limit, but decreases the hard
limit

References:
* https://www.freedesktop.org/software/systemd/man/systemd.exec.html
*
https://blog.skbali.com/2019/09/set-ulimits-for-a-script-started-using-systemd/

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years ago
CLanguagePurist 6247a1dd5d
Comment on PrivateUsers option for gitea.service (#20383)
* 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.
2 years ago
silverwind 4c3e56da13
Use Wants= over Requires= in systemd file (#15897)
`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>
3 years ago
zeripath 3a04d6f43f
Systemd needs After as well as Require (#15881)
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>
3 years ago
Bagas Sanjaya eab5837142
systemd service: Add commented PATH environment option for Git prefix (#13170)
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>
4 years ago
Anthony Vanelverdinghe 44ec9b933a Rephrase comment about RuntimeDirectory option (#8912) 5 years ago
Ramon Fischer 2282c659dd Explicity indicate the socket unit to use the service unit "gitea.service" (#8804)
* 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'
5 years ago
zeripath 0b44f0c465
Update the provided gitea.service to mention socket activation (#8531)
* 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>
5 years ago
Thomas McWork bc5a479fef Add unix socket help (#8377)
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.
5 years ago
techknowlogick dbb4aeead9
Change systemd service file to more correctly match Debian & Centos - Fix #4391 (#5777) 5 years ago
Lauris BH 1aee261aae More detailed documentation on how to set up from binary (#4121)
* More detailed documentation on how to set up from binary
Also change recommended file locations
6 years ago
techknowlogick af62ec5cc0 Note about adding permisions to binary (#3936)
in regards to binding to lower ports than 1024
6 years ago
William Mantly Jr e4f96c60cd App restarts to quickly if it fails to start. (#2945) 7 years ago
Thomas Boerger a06c3ad2c0 Synced gitignores with github repo (#1245)
* Renamed scripts directory into contrib

* Added script to download gitignores from github

* Synced gitignores with github repo
7 years ago