forgejo/templates/etc/systemd/system/forgejo.service.j2

35 lines
919 B
Plaintext
Raw Normal View History

2021-04-08 11:29:16 +02:00
[Unit]
2023-05-06 07:40:56 +02:00
Description=Forgejo (Git with a cup of tea)
2021-04-08 11:29:16 +02:00
After=syslog.target
After=network.target
#Requires=mysql.service
#Requires=mariadb.service
#Requires=postgresql.service
#Requires=memcached.service
#Requires=redis.service
[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
RestartSec=2s
Type=simple
2023-05-06 07:40:56 +02:00
User={{ forgejo_user }}
Group={{ forgejo_group }}
2021-04-08 11:29:16 +02:00
WorkingDirectory=/var/lib/gitea/
2023-05-06 07:40:56 +02:00
ExecStart={{ forgejo_bindir }}/gitea web -c {{ forgejo_confdir }}
2021-04-08 11:29:16 +02:00
Restart=always
RestartSec=3
2023-05-06 07:40:56 +02:00
Environment=USER={{ forgejo_user }} HOME=/home/{{ forgejo_user }} GITEA_WORK_DIR=/var/lib/gitea
# If you want to bind Forgejo to a port below 1024 uncomment
2021-04-08 11:29:16 +02:00
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target