0

I have a docker-compose, which spins up a HAProxy container. It uses wait-for.sh to wait for rails server to be alive. Once the connection is open, HAProxy exits.

HAProxy start command is something like this in the compose file: command: ["./wait-for.sh", "rails-app:10520", "-t", "600", "--", "haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

1 Answer 1

1

Figured it out.

HAProxy has startup parameter -db, which means "disable background mode". So the solution looks like command: ["./wait-for.sh", "rails-app:10520", "-t", "600", "--", "haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg", "-db"]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .