xoxys.freshrss/templates/systemd/user/freshrss-pod.service.j2

36 lines
861 B
Plaintext
Raw Normal View History

2022-03-20 15:12:57 +00:00
#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Description=FreshRSS Pod
Wants=network.target network-online.target
After=network-online.target
2022-06-28 20:52:45 +00:00
RequiresMountsFor=
Requires=dbus.socket {{ __freshrss_container_name }}.service
2022-03-20 15:12:57 +00:00
Before={{ __freshrss_container_name }}.service
[Service]
2022-04-10 15:22:57 +00:00
Type=forking
2022-03-20 15:12:57 +00:00
Environment=PODMAN_SYSTEMD_UNIT=%N
SyslogIdentifier=%N
LogExtraFields=CONTAINER_NAME=%N
Delegate=memory pids
2022-06-28 20:52:45 +00:00
Restart=on-failure
TimeoutSec=70
2022-03-20 15:12:57 +00:00
ExecStartPre=/usr/bin/podman pod create \
2022-06-28 20:52:45 +00:00
--replace \
2022-03-20 15:12:57 +00:00
{% for port in freshrss_exposed_ports %}
--publish {{ port }} \
{% endfor %}
--share ipc,net,uts \
--name {{ __freshrss_pod_name }}
ExecStart=/usr/bin/podman pod start {{ __freshrss_pod_name }}
ExecStop=/usr/bin/podman pod stop --ignore -t 10 {{ __freshrss_pod_name }}
[Install]
WantedBy=multi-user.target default.target