Created
February 14, 2015 01:23
-
-
Save andyshinn/698f372843feb9404f4c to your computer and use it in GitHub Desktop.
Example registrator systemd unit
This file contains hidden or 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=registrator | |
| Documentation=https://github.com/progrium/registrator | |
| X-Image=progrium/registrator | |
| [Service] | |
| EnvironmentFile=/etc/environment | |
| ExecStart=/bin/sh -c "docker run \ | |
| --name %p-%i \ | |
| -v /var/run/docker.sock:/tmp/docker.sock \ | |
| progrium/registrator \ | |
| -ttl 180 \ | |
| -ttl-refresh 120 \ | |
| -ip $COREOS_PRIVATE_IPV4 \ | |
| etcd://$COREOS_PRIVATE_IPV4:4001/firehose/services" | |
| ExecStop=/usr/bin/docker rm -f %p-%i | |
| TimeoutStartSec=30s | |
| TimeoutStopSec=30s | |
| RestartSec=30s | |
| Restart=on-failure | |
| [X-Fleet] | |
| X-Conflicts=%p@*.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment