Files
2026-01-06 22:12:07 +05:00

43 lines
1.0 KiB
Desktop File

[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
###
# Uncomment the appropriate line based on your database
###
#After=mysql.service
#After=mariadb.service
#After=postgresql.service
[Service]
# Modify these two values and uncomment them if you have
# temporary files that need to persist after restart
#ExecStartPre=+/bin/rm -rf /run/gitea
#ExecStartPre=+/bin/mkdir -p /run/gitea
# Чтобы использовать Systemd tmp.d / журнал:
# RuntimeDirectory=gitea
# Type=notify
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
# Путь к бинарнику и конфигурации
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
RestartSec=2s
# Окружение
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
# Hardening (опционально, но рекомендуется)
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target