swarmkit icon indicating copy to clipboard operation
swarmkit copied to clipboard

Using swarmctl to deploy my app -- what url?

Open imorti opened this issue 10 years ago • 2 comments

Perhaps this isn't the area for this question but where/how do I get the url for my app after I deploy it using swarmctl?

imorti avatar Jul 20 '16 22:07 imorti

So, the way this works is you set up a port mapping (just like in non-Swarm docker) and that port is exposed across the whole cluster. Then, you just hit ANY node in the swarm cluster on that port, and the application is exposed.

For example, my computer is set up as a one-node swarm cluster, and I create a service like docker service create --name nginx -p 8080:80 nginx Now if I go to localhost:8080, I can see the nginx startup page.

If I had more nodes, I could hit any of those nodes on port 8080 and still see the startup page.

dperny avatar Jul 21 '16 20:07 dperny

ahhh....got it. thanks!

imorti avatar Jul 21 '16 20:07 imorti