Created
May 30, 2021 15:31
-
-
Save rehmatworks/3cdae3c198188c860a2f1527c455b5d7 to your computer and use it in GitHub Desktop.
Docker Swarm deploy a sample Flask app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker swarm init | |
docker service create --mode global --publish target=8000,published=80 serpsbot/flask-test | |
# Get join token for workers | |
docker swarm join-token worker | |
## Will return | |
docker swarm join --token xyz ip-address:port | |
## Execute this command on all worker nodes. We have deployed the service in global mode, so every worker that joins the cluser will | |
## get an instance of the service deployed on it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment