scottslowe-learning-tools/docker-swarm-ha/consul.conf
Scott Lowe 22cb3119a9 Add Consul support
Add files to build Consul cluster as discovery backend for Docker Swarm cluster
2015-10-12 15:27:26 -06:00

19 lines
No EOL
336 B
Text

description "Consul server process"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
if [ -f "/etc/service/consul" ]; then
. /etc/service/consul
fi
export GOMAXPROCS=`nproc`
exec /usr/local/bin/consul agent \
-config-dir="/etc/consul.d/server" \
${CONSUL_FLAGS} \
>>/var/log/consul.log 2>&1
end script