Skip to content
Snippets Groups Projects
Commit 57e51fbd authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Updates ttl for nginx discovery

parent c6cd41ab
No related branches found
No related tags found
No related merge requests found
......@@ -23,11 +23,11 @@ ExecStart=/bin/bash -c '\
ip=`docker inspect --format \'{{.NetworkSettings.IPAddress}}\' $app-%i`; \
curl -f $ip; \
if [ $? -eq 0 ]; then \
etcdctl set /services/$app/%i \'{"ip":"\'$ip\'", "port":"80"}\' --ttl 30; \
etcdctl set /services/$app/%i \'{"ip":"\'$ip\'", "port":"80"}\' --ttl 60; \
else \
etcdctl rm /services/$app/%i; \
fi; \
sleep 20; \
sleep 50; \
done'
# Stop
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment