Skip to content

Instantly share code, notes, and snippets.

@pkern
Created January 20, 2018 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkern/6c6d6fa5f78cca39f49437442b0cd8a5 to your computer and use it in GitHub Desktop.
Save pkern/6c6d6fa5f78cca39f49437442b0cd8a5 to your computer and use it in GitHub Desktop.
alertmanager service using rkt
[Unit]
Description=alertmanager
Requires=network-online.target
After=network-online.target
[Service]
Slice=machine.slice
Delegate=true
ExecStartPre=/usr/bin/rkt fetch quay.io/prometheus/alertmanager:latest
ExecStart=/usr/bin/rkt run --net=host --volume volume-alertmanager,kind=host,source=/srv/mon/alertmanager,readOnly=false --mount volume=volume-alertmanager,target=/etc/alertmanager --volume resolv,kind=host,source=/etc/resolv.conf,readOnly=true --mount volume=resolv,target=/etc/resolv.conf quay.io/prometheus/alertmanager:latest
ExecStopPost=/usr/bin/rkt gc --mark-only
KillMode=mixed
Restart=always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment