2014-09-26 12:57:09 +00:00
|
|
|
[Unit]
|
|
|
|
Description=%p
|
2014-10-27 12:32:21 +00:00
|
|
|
|
|
|
|
# Requirements
|
2014-09-26 12:57:09 +00:00
|
|
|
Requires=docker.service
|
|
|
|
|
2014-10-27 12:32:21 +00:00
|
|
|
# Dependency ordering
|
|
|
|
After=docker.service
|
|
|
|
|
2014-09-26 12:57:09 +00:00
|
|
|
[Service]
|
|
|
|
Restart=always
|
|
|
|
TimeoutStartSec=0
|
2014-10-10 16:27:13 +00:00
|
|
|
ExecStartPre=-/usr/bin/docker kill %p
|
|
|
|
ExecStartPre=-/usr/bin/docker rm %p
|
2014-10-27 12:32:21 +00:00
|
|
|
ExecStart=/usr/bin/docker run \
|
|
|
|
--name %p \
|
|
|
|
-v /data/server-wide/haproxy:/etc/haproxy \
|
|
|
|
-p 80:80 \
|
|
|
|
-p 443:443 \
|
|
|
|
indiehosters/haproxy
|
2014-09-26 12:57:09 +00:00
|
|
|
ExecReload=/usr/bin/docker restart %p
|
2014-10-10 16:27:13 +00:00
|
|
|
ExecStop=/usr/bin/docker stop %p
|
2014-09-26 12:57:09 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|