This commit is contained in:
parent
c255d1ea58
commit
597f6c2cda
@ -5,6 +5,8 @@
|
|||||||
Description=FreshRSS App Server
|
Description=FreshRSS App Server
|
||||||
Wants=network.target network-online.target
|
Wants=network.target network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
|
RequiresMountsFor=%t/containers
|
||||||
Requires=dbus.socket
|
Requires=dbus.socket
|
||||||
|
|
||||||
BindsTo={{ __freshrss_pod_name }}.service
|
BindsTo={{ __freshrss_pod_name }}.service
|
||||||
@ -13,20 +15,22 @@ After={{ __freshrss_pod_name }}.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
KillMode=control-group
|
|
||||||
Environment=PODMAN_SYSTEMD_UNIT=%N
|
Environment=PODMAN_SYSTEMD_UNIT=%N
|
||||||
SyslogIdentifier=%N
|
SyslogIdentifier=%N
|
||||||
LogExtraFields=CONTAINER_NAME=%N
|
LogExtraFields=CONTAINER_NAME=%N
|
||||||
Delegate=memory pids
|
Delegate=memory pids
|
||||||
|
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
RestartSec=15s
|
TimeoutSec=70
|
||||||
|
|
||||||
ExecStartPre=/usr/bin/podman rm --force --ignore {{ __freshrss_container_name }}
|
|
||||||
ExecStartPre=/usr/bin/podman pod exists {{ __freshrss_pod_name }}
|
ExecStartPre=/usr/bin/podman pod exists {{ __freshrss_pod_name }}
|
||||||
ExecStartPre=/usr/bin/podman create \
|
ExecStart=/usr/bin/podman run \
|
||||||
--rm \
|
--rm \
|
||||||
|
--replace \
|
||||||
|
--detach \
|
||||||
--restart=no \
|
--restart=no \
|
||||||
|
--cgroups=no-conmon \
|
||||||
|
--sdnotify=conmon \
|
||||||
--env-file={{ __freshrss_systemd_env_dir }}/freshrss.env \
|
--env-file={{ __freshrss_systemd_env_dir }}/freshrss.env \
|
||||||
--pod {{ __freshrss_pod_name }} \
|
--pod {{ __freshrss_pod_name }} \
|
||||||
{% if freshrss_memory_limit is defined %}
|
{% if freshrss_memory_limit is defined %}
|
||||||
@ -38,7 +42,6 @@ ExecStartPre=/usr/bin/podman create \
|
|||||||
{% if freshrss_cpu_quota is defined %}
|
{% if freshrss_cpu_quota is defined %}
|
||||||
--cpu-quota={{ freshrss_cpu_quota }} \
|
--cpu-quota={{ freshrss_cpu_quota }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--sdnotify=conmon \
|
|
||||||
{% for item in freshrss_security_opt %}
|
{% for item in freshrss_security_opt %}
|
||||||
--security-opt={{ item }} \
|
--security-opt={{ item }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -55,8 +58,7 @@ ExecStartPre=/usr/bin/podman create \
|
|||||||
--name={{ __freshrss_container_name }} \
|
--name={{ __freshrss_container_name }} \
|
||||||
{{ freshrss_image }}
|
{{ freshrss_image }}
|
||||||
|
|
||||||
ExecStart=/usr/bin/podman start {{ __freshrss_container_name }}
|
ExecStop=/usr/bin/podman stop --ignore {{ __freshrss_container_name }}
|
||||||
ExecStop=/usr/bin/podman stop --ignore -t 10 {{ __freshrss_container_name }}
|
|
||||||
ExecStopPost=/usr/bin/podman rm --force --ignore {{ __freshrss_container_name }}
|
ExecStopPost=/usr/bin/podman rm --force --ignore {{ __freshrss_container_name }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -6,22 +6,22 @@ Description=FreshRSS Pod
|
|||||||
Wants=network.target network-online.target
|
Wants=network.target network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
|
RequiresMountsFor=
|
||||||
Requires=dbus.socket {{ __freshrss_container_name }}.service
|
Requires=dbus.socket {{ __freshrss_container_name }}.service
|
||||||
Before={{ __freshrss_container_name }}.service
|
Before={{ __freshrss_container_name }}.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
KillMode=control-group
|
|
||||||
Environment=PODMAN_SYSTEMD_UNIT=%N
|
Environment=PODMAN_SYSTEMD_UNIT=%N
|
||||||
SyslogIdentifier=%N
|
SyslogIdentifier=%N
|
||||||
LogExtraFields=CONTAINER_NAME=%N
|
LogExtraFields=CONTAINER_NAME=%N
|
||||||
Delegate=memory pids
|
Delegate=memory pids
|
||||||
|
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
RestartSec=15s
|
TimeoutSec=70
|
||||||
|
|
||||||
ExecStartPre=/usr/bin/podman pod rm --force --ignore {{ __freshrss_pod_name }}
|
|
||||||
ExecStartPre=/usr/bin/podman pod create \
|
ExecStartPre=/usr/bin/podman pod create \
|
||||||
|
--replace \
|
||||||
{% for port in freshrss_exposed_ports %}
|
{% for port in freshrss_exposed_ports %}
|
||||||
--publish {{ port }} \
|
--publish {{ port }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user