Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run multiple HAProxy containers on different ports #40

Open
dav101 opened this issue Nov 11, 2020 · 0 comments
Open

Run multiple HAProxy containers on different ports #40

dav101 opened this issue Nov 11, 2020 · 0 comments

Comments

@dav101
Copy link

dav101 commented Nov 11, 2020

I have 2 docker containers running using
docker run -d -p 5566:5566 -p 4444:4444 --env tors=25 mattes/rotating-proxy
docker run -d -p 5567:5566 -p 4445:4444 --env tors=25 mattes/rotating-proxy

One on port 5566 and one on 5567 but they do not run concurrently, either one runs or the other.
I looked into the container with command docker exec -it <containerID> /bin/bash and found there are 3 haproxy configurations

  1. /etc/haproxy/haproxy.cfg – doesn’t define frontend or backend definitions
  2. /usr/local/etc/haproxy.cfg.erb – defines frontend and but does not specify binding port
  3. /usr/local/etc/haproxy.cfg – defines frontend binding port 5566
    I want to be able to define the ports to run on inside the docker container and I believe I should set the binding port in file /usr/local/etc/haproxy.cfg is this correct?

I also want to be able to stop start haproxy service, I believe there is a executable to run this /etc/init.d/haproxy How do I stop start the haproxy service?

Spec:
Server: Ubuntu 18.04 (running as VM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant