Robert Kaussow
1f84cb7538
All checks were successful
continuous-integration/drone/push Build is passing
36 lines
926 B
Django/Jinja
36 lines
926 B
Django/Jinja
#jinja2:lstrip_blocks: True
|
|
{{ ansible_managed | comment }}
|
|
|
|
[Unit]
|
|
Description=FreshRSS Pod
|
|
Wants=network.target network-online.target
|
|
After=network-online.target
|
|
|
|
Requires= dbus.socket {{ __freshrss_container_name }}.service
|
|
Before={{ __freshrss_container_name }}.service
|
|
|
|
[Service]
|
|
Type=forking
|
|
KillMode=control-group
|
|
Environment=PODMAN_SYSTEMD_UNIT=%N
|
|
SyslogIdentifier=%N
|
|
LogExtraFields=CONTAINER_NAME=%N
|
|
Delegate=memory pids
|
|
|
|
Restart=always
|
|
RestartSec=15s
|
|
|
|
ExecStartPre=/usr/bin/podman pod rm --force --ignore {{ __freshrss_pod_name }}
|
|
ExecStartPre=/usr/bin/podman pod create \
|
|
{% 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
|