scottslowe-learning-tools/docker-swarm/consul.conf
Scott S. Lowe a4178a889b Update Docker Swarm+Consul environment
Update learning environment for running a Consul-backed Docker Swarm cluster
2016-09-25 14:02:14 -06:00

21 lines
398 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`
BIND_ADDR=`hostname -I | cut -f2 -d' '`
exec /usr/local/bin/consul agent \
-config-dir="/etc/consul.d/server" \
-bind $BIND_ADDR \
${CONSUL_FLAGS} \
>>/var/log/consul.log 2>&1
end script