Hi everyone,
I was following this guide, unfortunately I’m facing to the following issue :
-
When I try to reach “mydomain.example/myapp”, I’m getting “Cannot GET /myapp”
-
As a test, I created 2 containers Apache and Nginx, and it was working fine (I tested with /nginx and /apache)
-
When I check haproxy report, I can see “myapp” “Active UP” with the correct IP (from the overlay network) on port 49000.
Here is my haproxy.cfg file: https://pastebin.com/jDmbSqN6
Docker commands :
Network:
sudo docker network create --attachable --driver overlay apache-network
Services:
mydomain.example/
sudo docker service create
–mode replicated
–replicas 1
–name home-Service
–network apache-network
–endpoint-mode dnsrr
httpd:2.4
mydomain.example/myapp
sudo docker service create
–mode replicated
–replicas 1
–name myapp-Service
–network apache-network
–endpoint-mode dnsrr
somewhere/myapp:1.0
myapp is container with a NodeJS server that host a small webapp
If I remove HAProxy, and I recreate the service “myapp” and replace “endpoint-mode” by the publishing port (-p 49000: 49000), myapp works fine.
Any suggestions on how I can troubleshoot or resolve this issue ? :-/
Thanks in advance!