[Unit]
Description=Gitea (Git with a cup of tea)
After=network.target

[Service]
RestartSec=30s
Type=simple
User=gitea
Group=gitea
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
Restart=on-failure
Environment="GITEA_WORK_DIR=/var/lib/gitea/"
EnvironmentFile=-/etc/default/gitea

[Install]
WantedBy=multi-user.target

# Stealed from https://gitlab.com/packaging/gitea/-/blob/master/.packaging/gitea.service