You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/reference/compose-file/deploy.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,12 +52,12 @@ services:
52
52
53
53
`mode` defines the replication model used to run a service or job. Options include:
54
54
55
-
1. **`global`**: Ensures exactly one task continuously runs per physical node until stopped.
56
-
2. **`replicated`**: Continuously runs a specified number of tasks across nodes until stopped (default).
57
-
3. **`replicated-job`**: Executes a defined number of tasks until a completion state (exits with code 0)'.
55
+
- `global`: Ensures exactly one task continuously runs per physical node until stopped.
56
+
- `replicated`: Continuously runs a specified number of tasks across nodes until stopped (default).
57
+
- `replicated-job`: Executes a defined number of tasks until a completion state (exits with code 0)'.
58
58
- Total tasks are determined by `replicas`.
59
59
- Concurrency can be limited using the `max-concurrent` option (CLI only).
60
-
4. **`global-job`**: Executes one task per physical node with a completion state (exits with code 0).
60
+
- `global-job`: Executes one task per physical node with a completion state (exits with code 0).
61
61
- Automatically runs on new nodes as they are added.
62
62
63
63
```yml
@@ -79,11 +79,12 @@ services:
79
79
mode: global-job
80
80
```
81
81
82
-
**Note**:
83
-
- Job modes (`replicated-job` and `global-job`) are designed for tasks that complete and exit with code 0.
84
-
- Completed tasks remain until explicitly removed.
85
-
- Options like `max-concurrent` for controlling concurrency are supported only via the CLI and are not available in Compose YAML.
86
-
- For more detailed information about job options and behavior, see the [Docker CLI documentation](/reference/cli/docker/service/create/#running-as-a-job)
82
+
> [!NOTE]
83
+
> - Job modes (`replicated-job` and `global-job`) are designed for tasks that complete and exit with code 0.
84
+
> - Completed tasks remain until explicitly removed.
85
+
> - Options like `max-concurrent` for controlling concurrency are supported only via the CLI and are not available in Compose.
86
+
87
+
For more detailed information about job options and behavior, see the [Docker CLI documentation](/reference/cli/docker/service/create.md#running-as-a-job)
0 commit comments