From ab06bc177e85dd4f03a5331455144ea62a88a210 Mon Sep 17 00:00:00 2001 From: DeadSwitch Date: Tue, 10 Feb 2026 09:31:52 +0100 Subject: [PATCH] Updated the service file with Postgresql When the pgsql is used as backend, the gitea service must wait for the database. --- templates/gitea.service.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/gitea.service.j2 b/templates/gitea.service.j2 index 7889d9a..c2e77ea 100644 --- a/templates/gitea.service.j2 +++ b/templates/gitea.service.j2 @@ -3,6 +3,10 @@ [Unit] Description=Gitea (Git with a cup of tea) After=network.target +{% if gitea_database_server | default('') == "postgresql" %} +Wants=postgresql.service +After=postgresql.service +{% endif %} [Service] RestartSec=2s