Replies: 1 comment
-
Hi. If your proxy is going to be reachable on non standard HTTP / HTTPS ports (like Also:
Using IP as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I currently use docker-compose to deploy 2 services that listen on different ports on server A with example IP 1.2.3
Let's say "service 1" listens on port 3000 and "service 2" listens on port 4000.
Since both ports, 3000 and 4000, are opened on server A, I can access the respective endpoints from outside the server, e.g. by sending POST requests to
http://1.2.3:3000/endpoint
(service 1) andhttp://1.2.3:4000/endpoint
(service 2).This setup works without any problem.
However, since opening multiple ports for different services is not really a nice and scalable option, I figured I could use a reverse-proxy (no experience what so ever) to only open 1 port on server A, e.g. 8000 and forward the requests based on a given path to the respective ports (not open anymore) of the deployed services.
So sending a post request to
http://1.2.3:8000/service-1/endpoint
andhttp://1.2.3:8000/service-2/endpoint
should be forwarded by the proxy to the respective endpoints listening on local ports 3000 and 4000.Reading the
README.md
of this repo I figured such adocker-compose.yml
should work.However, when sending post requests after the services are created I always receive connection timeout errors.
Can someone maybe help me find the mistake? How do I have to tweak the docker-compose yaml file in order to get my desired setup to work?
Thanks a lot and best regards
Beta Was this translation helpful? Give feedback.
All reactions