holgersson-overlay/www-apps/gitea/files/gitea.service-r3
Nils Freydank 01e107374f
www-apps/gitea: Add new package, version 1.20.2
The ebuild was based on the tree version earlier in 1.19.x series.
I dropped filecaps support, so it's necessary to configure direct
network access yourself (e.g. using systemd socket magic[1]) or use a
TLS termination proxy like nginx, caddy or traefik in front.

Besides, the gitea builds and runs fine now w/ PIE (or it is disabled
on a global scale somewhere). However, it's not necessary anymore to
strip out the flags in the ebuild[2].

[1] ListenStream in systemd socket configuration files
    and for a explanation e.g.
    https://liquidat.wordpress.com/2018/01/04/howto-run-programs-as-non-root-user-on-privileged-ports-via-systemd/
[2] https://bugs.gentoo.org/832756

Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
2023-08-06 22:11:42 +02:00

35 lines
732 B
Plaintext

[Unit]
Description=Gitea service
Documentation=https://docs.gitea.io/
AssertPathIsDirectory=/var/lib/gitea
AssertPathIsReadWrite=/var/lib/gitea
After=network.target
Requires=network.target
After=mysqld.service
After=postgresql-9.5.service
After=postgresql-9.6.service
After=postgresql-10.service
After=postgresql-11.service
After=postgresql-12.service
After=postgresql-13.service
After=postgresql-14.service
After=memcached.service
After=redis.service
[Service]
User=git
Group=git
Environment="GITEA_WORK_DIR=/var/lib/gitea" "GITEA_CUSTOM=/var/lib/gitea/custom"
WorkingDirectory=/var/lib/gitea
ExecStart=/usr/bin/gitea web --config /etc/gitea/app.ini
Restart=always
PrivateTmp=true
Nice=5
[Install]
WantedBy=multi-user.target