Skip to content

Commit 0b44f0c

Browse files
zeripathguillep2k
andauthored
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 <[email protected]>
1 parent e1505d6 commit 0b44f0c

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

contrib/systemd/gitea.service

+33-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,41 @@
22
Description=Gitea (Git with a cup of tea)
33
After=syslog.target
44
After=network.target
5+
###
6+
# Don't forget to add the database service requirements
7+
###
8+
#
59
#Requires=mysql.service
610
#Requires=mariadb.service
711
#Requires=postgresql.service
812
#Requires=memcached.service
913
#Requires=redis.service
14+
#
15+
###
16+
# If using socket activation for main http/s
17+
###
18+
#
19+
#After=gitea.main.socket
20+
#Requires=gitea.main.socket
21+
#
22+
###
23+
# (You can also provide gitea an http fallback and/or ssh socket too)
24+
#
25+
# An example of /etc/systemd/system/gitea.main.socket
26+
###
27+
##
28+
## [Unit]
29+
## Description=Gitea Web Socket
30+
## PartOf=gitea.service
31+
##
32+
## [Socket]
33+
## ListenStream=
34+
## NoDelay=true
35+
##
36+
## [Install]
37+
## WantedBy=sockets.target
38+
##
39+
###
1040

1141
[Service]
1242
# Modify these two values and uncomment them if you have
@@ -26,11 +56,12 @@ WorkingDirectory=/var/lib/gitea/
2656
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
2757
Restart=always
2858
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
29-
# If you want to bind Gitea to a port below 1024 uncomment
30-
# the two values below
59+
# If you want to bind Gitea to a port below 1024, uncomment
60+
# the two values below, or use socket activation to pass Gitea its ports as above
3161
###
3262
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
3363
#AmbientCapabilities=CAP_NET_BIND_SERVICE
64+
###
3465

3566
[Install]
3667
WantedBy=multi-user.target

0 commit comments

Comments
 (0)