Browse Source

Add unix socket help (#8377)

When using unix socket as listener (`HTTP_ADDR = /run/gitea/gitea.socket`) then it's required to have the folder `/run/gitea` with appropriate owner/group. Manual creation leads to vanishing after reboot. This directive enables Systemd to handle this.
tags/v1.11.0-dev
Thomas McWork techknowlogick 5 years ago
parent
commit
aa1013cb3d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      contrib/systemd/gitea.service

+ 3
- 0
contrib/systemd/gitea.service View File

@@ -20,6 +20,9 @@ Type=simple
User=git User=git
Group=git Group=git
WorkingDirectory=/var/lib/gitea/ WorkingDirectory=/var/lib/gitea/
# If using unix socket: Tells Systemd to create /run/gitea folder to home gitea.sock
# Manual cration would vanish after reboot.
#RuntimeDirectory=gitea
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea


Loading…
Cancel
Save