xoxys.renovate_bot/templates/etc/systemd/system/renovate.service.j2
Robert Kaussow 5e9fd7174d
Some checks are pending
continuous-integration/drone/push Build is pending
initial commit
2020-10-10 10:03:50 +02:00

22 lines
655 B
Django/Jinja

#jinja2:lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Description=Renovate Bot
Requires=docker.service network-online.target
After=docker.service network-online.target
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/docker ps | /bin/grep %p 1> /dev/null && /usr/bin/docker kill %p || true'
ExecStartPre=/bin/sh -c '/usr/bin/docker ps -a | /bin/grep %p 1> /dev/null && /usr/bin/docker rm %p || true'
ExecStartPre=/usr/bin/docker pull {{ renovatebot_image }}
ExecStart=/usr/bin/docker run --rm \
--name %p \
--hostname %p \
--env-file /etc/sysconfig/renovate \
{{ renovatebot_image }} \
[Install]
WantedBy=multi-user.target