I will assume that you are already enabled the Swarm Mode
in Docker, if not, enable it:
docker swarm init
docker network create --driver=overlay --attachable proxy
This is what you are going to build
git clone https://github.com/nezarfadle/docker-microservices-helloworld.git
cd docker-microservices-helloworld
Before you start the Microservices Stack we need to build the Applications Images
docker build -t local-nginx:latest . --file Nginx.Dockerfile
docker build -t admins_app:latest . --file Admins.Dockerfile
docker build -t users_app:latest . --file Users.Dockerfile
Here is where the fun part begins
docker stack deploy -c NginxStack.yml proxy
docker stack deploy -c UsersStack.yml users
docker stack deploy -c AdminsStack.yml admins