summaryrefslogtreecommitdiffstats
path: root/roles/etcd/templates/etcd.docker.service
blob: cf957ede8560bf25cf94cc7eb345c04106b75dfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[Unit]
Description=The Etcd Server container
After=docker.service
Requires=docker.service
PartOf=docker.service

[Service]
EnvironmentFile=/etc/etcd/etcd.conf
ExecStartPre=-/usr/bin/docker rm -f {{ etcd_service }}
ExecStart=/usr/bin/docker run --name {{ etcd_service }} --rm -v /var/lib/etcd:/var/lib/etcd:z -v /etc/etcd:/etc/etcd:z --env-file=/etc/etcd/etcd.conf --net=host --entrypoint=/usr/bin/etcd {{ openshift.etcd.etcd_image }}
ExecStop=/usr/bin/docker stop {{ etcd_service }}
SyslogIdentifier=etcd_container
Restart=always
RestartSec=5s

[Install]
WantedBy=docker.service