Skip to content
Snippets Groups Projects
confd.service 578 B
Newer Older
[Unit]
Description=%p
Pierre Ozoux's avatar
Pierre Ozoux committed

# Requirements
Requires=docker.service
Pierre Ozoux's avatar
Pierre Ozoux committed
Requires=etcd.service
Pierre Ozoux's avatar
Pierre Ozoux committed
# Dependency ordering
After=docker.service
Pierre Ozoux's avatar
Pierre Ozoux committed
After=etcd.service
Before=haproxy.service
Pierre Ozoux's avatar
Pierre Ozoux committed

[Service]
Restart=always
Pierre Ozoux's avatar
Pierre Ozoux committed
RestartSec=20
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill %p
ExecStartPre=-/usr/bin/docker rm %p
Pierre Ozoux's avatar
Pierre Ozoux committed
ExecStart=/usr/bin/docker run \
Pierre Ozoux's avatar
Pierre Ozoux committed
  --rm \
Pierre Ozoux's avatar
Pierre Ozoux committed
  --name %p \
  -v /data/runtime/haproxy/:/etc/haproxy/ \
Pierre Ozoux's avatar
Pierre Ozoux committed
  -v /var/run/docker.sock:/var/run/docker.sock \
  indiepaas/confd
ExecReload=/usr/bin/docker restart %p
ExecStop=/usr/bin/docker stop %p

[Install]
WantedBy=multi-user.target
Pierre Ozoux's avatar
Pierre Ozoux committed