Running haproxy in foreground on docker container

Viewed 313

Previously, I have been using haproxy on the server manually. In that time, I used the command "sudo service haproxy start" to make the haproxy running. The haproxy.cfg was dynamically updated by other processes, so I was using some script to reload the haproxy whenever some changes occured in the haproxy.cfg file.

Now, I am planning to use the docker container for the haproxy as sidecar container to my AWS ECS Fargate service. In docker, I will be running haproxy as the foreground process with the following command:

haproxy -f /etc/haproxy/haproxy.cfg

Since the process is running on foreground, I cannot reload the haproxy configuration as I did in the previous configuration.

Do I actually need to use the haproxy reload script here while running the haproxy as foreground process? Will it reflect the new changes in haproxy.cfg automatically?

Thanks.

0 Answers
Related