Files
ds_gitea/templates/gitea.service.j2
DeadSwitch ab06bc177e Updated the service file with Postgresql
When the pgsql is used as backend, the gitea service
must wait for the database.
2026-02-10 09:31:52 +01:00

23 lines
542 B
Django/Jinja

# {{ ansible_managed }}
[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
Type=simple
User={{ gitea_user }}
Group={{ gitea_group }}
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER={{ gitea_user }} HOME=/home/{{ gitea_user }} GITEA_WORK_DIR=/var/lib/gitea
[Install]
WantedBy=multi-user.target