Search⌘ K
AI Features

Managing the App

Explore how to deploy and manage multi-container applications using Docker Stacks. Understand the preferred declarative method to update services through stack files, monitor rollout progress, and troubleshoot common issues like volume conflicts to maintain app performance.

Manage services

There are two ways to manage Docker stacks:

  • Imperatively

  • Declaratively

The imperative method is where you run Docker commands to make changes to the stack. For example, using the docker service scale command to increase and decrease the number of service replicas.

The declarative method is where you make all changes via the stack file. For example, if you want to change the number of service replicas, you edit the stack file with the desired replica count and run another docker stack deploy command.

Declarative method

The declarative method is the preferred method. Consider the following example that demonstrates why you should manage stacks declaratively. ...