JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
DevOps
Kubernetes (K8s)
Docker
HELM
Ansible
Linux Commands
More
Share
Explore
Docker Swarm (Orchestration Service by docker)
Deploy a multi node application in docker swarm
Architecture of the application
This architecture will require 1 Mount Volume(for database), 2 Networks and 5 Stack services.
Steps:
First create the network
Frontend network
docker network create -d overlay front_end_ntw
Backend network
docker network create -d overlay back_end_ntw
Deploying the voting frontend app
docker service create --name vote -p 5000:80 --network front_end_ntw --replicas 5 dockersamples/examplevotingapp_vote:before
Deploying redis
docker service create --name redis --network front_end_ntw --replicas 5 redis:3.2
Deploying worker service
docker service create --name worker --network front_end_ntw --network back_end_ntw dockersamples/examplevotingapp_worker:latest
Deploying postgres database
docker service create --name db --network back_end_ntw --mount type=volume,source=db-data,target=/var/lib/postgresql/data postgres:9.4
Deploying result service
docker service create --name result --network back_end_ntw -p 5001:80 dockersamples/examplevotingapp_result:before
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.