From bf40b859df81689b44b4aeb4eb96e123633696ea Mon Sep 17 00:00:00 2001 From: Christopher Hunt Date: Mon, 30 Jan 2017 11:30:02 -0800 Subject: [PATCH] Mount /etc/haproxy instead of a single file (allows reload) Closes #675 (carried with attribution) --- haproxy/content.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/haproxy/content.md b/haproxy/content.md index ca19d03fe..5c18954c1 100644 --- a/haproxy/content.md +++ b/haproxy/content.md @@ -46,9 +46,11 @@ You may need to publish the ports your haproxy is listening on to the host by sp ## Directly via bind mount ```console -$ docker run -d --name my-running-haproxy -v /path/to/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro haproxy:1.7 +$ docker run -d --name my-running-haproxy -v /path/to/etc/haproxy:/usr/local/etc/haproxy:ro haproxy:1.7 ``` +Note that your host's `/path/to/etc/haproxy` folder should be populated with a file named `haproxy.cfg`. If this configuration file refers to any other files within that folder then you should ensure that they also exist (e.g. template files such as `400.http`, `404.http`, and so forth). However, many minimal configurations do not require any supporting files. + ### Reloading config If you used a bind mount for the config and have edited your `haproxy.cfg` file, you can use haproxy's graceful reload feature by sending a `SIGHUP` to the container: