init
This commit is contained in:
42
migration-scripts/systemd/gitea.service
Normal file
42
migration-scripts/systemd/gitea.service
Normal file
@@ -0,0 +1,42 @@
|
||||
[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
|
||||
Reference in New Issue
Block a user