diff --git a/templates/etc/containers/systemd/gitea.container.j2 b/templates/etc/containers/systemd/gitea.container.j2 index a507c71..10b9c91 100644 --- a/templates/etc/containers/systemd/gitea.container.j2 +++ b/templates/etc/containers/systemd/gitea.container.j2 @@ -15,6 +15,7 @@ EnvironmentFile=/etc/containers/systemd/gitea.env {% for item in gitea_volumes %} Volume={{ item.name }}:{{ item.dest }}{{ ":" + item.opts if item.opts is defined else "" }} {% endfor %} +{% if (gitea_cap_add + gitea_cap_drop) | length > 0 %} {% if gitea_cap_add | length > 0 %} AddCapability={{ gitea_cap_add | join(" ") }} @@ -22,6 +23,7 @@ AddCapability={{ gitea_cap_add | join(" ") }} {% if gitea_cap_drop | length > 0 %} DropCapability={{ gitea_cap_drop | join(" ") }} {% endif %} +{% endi %} Network={{ gitea_network }} {% for item in gitea_exposed_ports %}