Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
confd-demo/confd.service
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35 lines (26 sloc)
934 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Configuration Service | |
#our data volume must be ready | |
After=confdata.service | |
Requires=confdata.service | |
[Service] | |
EnvironmentFile=/etc/environment | |
#kill any existing confd | |
ExecStartPre=-/usr/bin/docker kill %n | |
ExecStartPre=-/usr/bin/docker rm %n | |
#preload container...this ensures we fail if our registry is down and we can't | |
#obtain the build we're expecting | |
ExecStartPre=/usr/bin/docker pull lordelph/confd-demo | |
#we need to provide our confd container with the IP it can reach etcd | |
#on, the docker socket so it send HUP signals to nginx, and our data volume | |
ExecStart=/usr/bin/docker run --rm \ | |
-e COREOS_PRIVATE_IPV4=${COREOS_PRIVATE_IPV4} \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
--volumes-from=conf-data \ | |
--name %n \ | |
lordelph/confd-demo | |
ExecStop=/usr/bin/docker stop -t 3 %n | |
Restart=on-failure | |
[X-Fleet] | |
#we need to be on the same machine as confdata.service | |
MachineOf=confdata.service |