|Compose V1/V2||Compose V3|
||mode in Compose.|
Set the service as a global service.
Some services need to be deployed to every node, such as monitoring and logging services. When a node is created, a container is deployed to the node.
A service is deployed to each node of the cluster if the service is set as
global. When a node is created or added in the cluster, a container is automatically deployed to the node.
This function is equivalent to the Global Service (see the following section mode) in swarm mode. When a node is added to the cluster, the corresponding container will be automatically created on that node.
The mode can be configured as Global (one container on each node) or Replicated (specified number of containers). Replicated is configured by default.