CiscoCloud / haproxy-consul

Dynamic haproxy configuration using consul
Apache License 2.0
168 stars 85 forks source link

launch skript exit after docker stop / start #10

Closed michaelhaessig closed 8 years ago

michaelhaessig commented 9 years ago

I'm running the container as a upstart service , when stopping container an starting it again the launch.sh skript tries to link the haproxy template again and the "ln" command fails which causes the container to stop.

https://github.com/CiscoCloud/haproxy-consul/blob/master/launch.sh#L54

easy fix for this is to add "-sf" instead of "-s" to the link command.

michaelhaessig commented 9 years ago

Regarding supporting starting and stopping the container , if the template did not change in the meantime , haproxy will not be started at boot.

to fix this we could remove the genereated haproxy template in the launch skript

rm -rf haproxy/haproxy.cfg || true