How to access swarm service via vip on external

Hi All,

I have 3 node in a swarm service, But I cannot access vip on external network, how can I access it on my office network? My swarm VIP can be access container-only, How to access VIP via external?

I’m created the Docker swarm via docker swarm init command , I can see the VIP when I try to run docker server inspect XXX, I want to access the VIP on my office network

hi @cnlxh, Have you mentioned the port in docker-compose file to expose the app to external network (i.e. Host and container port mapping).
If you can show your docker-compose file , it can help to understand the problem.
This kind of problem also occurs when inbound traffic is not allowed on the host port number you mentioned in docker compose file…

I have add external: to my file, Should I use haproxy above docker swarm for high available external access?

hi @cnlxh, yes you need to run a haproxy container above your containers to balance the load between them and to made your application highly available.