...

/

Deploying the Sample App

Deploying the Sample App

Let's deploy the application to the Swarm cluster.

If you plan on following this lesson, you’ll need a copy of the course GitHub repo and a swarm. The examples use a three-node swarm with a single manager called mgr1 and two workers called wrk1 and wrk2.

Note: Use the following command to clone the repo, if you haven’t already.

$ git clone https://github.com/Educative-Content/ddd-book.git
Cloning into 'ddd-book'...
remote: Enumerating objects: 8904, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 8904 (delta 21), reused 70 (delta 18), pack-reused 8830
Receiving objects: 100% (8904/8904), 74.00 MiB | 4.18 MiB/s, done.
Resolving deltas: 100% (1378/1378), done.
Cloned the ddd-book repository from GitHub.

Deploy the app

You deploy Stacks with the docker stack deploy command, and in its basic form, it accepts two arguments:

  • The name of the stack file (Compose file)

  • The name of the stack (app)

We’ll use the compose.yaml file in the ddd-book/swarm-app folder, and ...

Access this course and 1400+ top-rated courses and projects.