Skip to content

Commit 9cece86

Browse files
authored
Merge pull request #10644 from docker/master
Publish updates from master
2 parents ae6849e + a173d1b commit 9cece86

File tree

14 files changed

+96
-45
lines changed

14 files changed

+96
-45
lines changed

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks", "index.html", "404.
2121
latest_engine_api_version: "1.40"
2222
docker_ce_version: "19.03"
2323
docker_ee_version: "19.03"
24-
compose_version: "1.25.4"
25-
compose_file_v3: "3.7"
24+
compose_version: "1.25.5"
25+
compose_file_v3: "3.8"
2626
compose_file_v2: "2.4"
2727
machine_version: "0.16.0"
2828
distribution_version: "2.7"

_config_authoring.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ exclude: ["_scripts", "apidocs/layouts", "Gemfile", "hooks", "index.html", "404.
2424
latest_engine_api_version: "1.40"
2525
docker_ce_version: "19.03"
2626
docker_ee_version: "19.03"
27-
compose_version: "1.25.4"
28-
compose_file_v3: "3.7"
27+
compose_version: "1.25.5"
28+
compose_file_v3: "3.8"
2929
compose_file_v2: "2.4"
3030
machine_version: "0.16.0"
3131
distribution_version: "2.7"

_data/toc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,10 +1100,10 @@ manuals:
11001100
title: Getting started
11011101
- path: /compose/swarm/
11021102
title: Using Compose with Swarm
1103-
- path: /compose/env-file/
1104-
title: Environment file
11051103
- path: /compose/environment-variables/
11061104
title: Environment variables in Compose
1105+
- path: /compose/env-file/
1106+
title: Environment file
11071107
- path: /compose/extends/
11081108
title: Extend services in Compose
11091109
- path: /compose/networking/

_includes/content/compose-matrix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ This table shows which Compose file versions support specific Docker releases.
22

33
| **Compose file format** | **Docker Engine release** |
44
| ------------------- | ------------------ |
5+
| 3.8 | 19.03.0+ |
56
| 3.7 | 18.06.0+ |
67
| 3.6 | 18.02.0+ |
78
| 3.5 | 17.12.0+ |

compose/compose-file/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,29 @@ services:
796796
replicas: 6
797797
```
798798

799+
#### max_replicas_per_node
800+
801+
If the service is `replicated` (which is the default), [limit the number of replicas](/engine/reference/commandline/service_create.md#specify-maximum-replicas-per-node---replicas-max-per-node)
802+
that can run on an node at any time.
803+
804+
> **[Version 3.8](compose-versioning.md#version-3) and above.**
805+
806+
When there are more tasks requested than running nodes, an error `no suitable node (max replicas per node limit exceed)` is raised.
807+
808+
```yaml
809+
version: "{{ site.compose_file_v3 }}"
810+
services:
811+
worker:
812+
image: dockersamples/examplevotingapp_worker
813+
networks:
814+
- frontend
815+
- backend
816+
deploy:
817+
mode: replicated
818+
replicas: 6
819+
max_replicas_per_node: 1
820+
```
821+
799822
#### resources
800823

801824
Configures resource constraints.

compose/django.md

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,27 @@ and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extensi
6060
expose. See the [`docker-compose.yml` reference](/compose/compose-file/index.md) for more
6161
information on how this file works.
6262

63-
9. Add the following configuration to the file.
63+
9. Add the following configuration to the file.
6464

6565
```none
66-
version: '3'
67-
68-
services:
69-
db:
70-
image: postgres
71-
web:
72-
build: .
73-
command: python manage.py runserver 0.0.0.0:8000
74-
volumes:
75-
- .:/code
76-
ports:
77-
- "8000:8000"
78-
depends_on:
79-
- db
66+
version: '3'
67+
68+
services:
69+
db:
70+
image: postgres
71+
environment:
72+
- POSTGRES_DB=postgres
73+
- POSTGRES_USER=postgres
74+
- POSTGRES_PASSWORD=postgres
75+
web:
76+
build: .
77+
command: python manage.py runserver 0.0.0.0:8000
78+
volumes:
79+
- .:/code
80+
ports:
81+
- "8000:8000"
82+
depends_on:
83+
- db
8084
```
8185
8286
This file defines two services: The `db` service and the `web` service.
@@ -138,21 +142,24 @@ In this section, you set up the database connection for Django.
138142
139143
1. In your project directory, edit the `composeexample/settings.py` file.
140144
141-
2. Replace the `DATABASES = ...` with the following:
142-
143-
DATABASES = {
144-
'default': {
145-
'ENGINE': 'django.db.backends.postgresql',
146-
'NAME': 'postgres',
147-
'USER': 'postgres',
148-
'HOST': 'db',
149-
'PORT': 5432,
150-
}
151-
}
152-
153-
These settings are determined by the
154-
[postgres](https://hub.docker.com/_/postgres) Docker image
155-
specified in `docker-compose.yml`.
145+
2. Replace the `DATABASES = ...` with the following:
146+
147+
# setting.py
148+
149+
DATABASES = {
150+
'default': {
151+
'ENGINE': 'django.db.backends.postgresql',
152+
'NAME': 'postgres',
153+
'USER': 'postgres',
154+
'PASSWORD': 'postgres',
155+
'HOST': 'db',
156+
'PORT': 5432,
157+
}
158+
}
159+
160+
These settings are determined by the
161+
[postgres](https://hub.docker.com/_/postgres) Docker image
162+
specified in `docker-compose.yml`.
156163
157164
3. Save and close the file.
158165

compose/production.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ production. These changes may include:
2020
- Removing any volume bindings for application code, so that code stays inside
2121
the container and can't be changed from outside
2222
- Binding to different ports on the host
23-
- Setting environment variables differently, such as when you need to decrease the verbosity of
24-
logging, or to enable email sending)
23+
- Setting environment variables differently, such as reducing the verbosity of
24+
logging, or to specify settings for external services such as an email server
2525
- Specifying a restart policy like `restart: always` to avoid downtime
2626
- Adding extra services such as a log aggregator
2727

compose/release-notes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ redirect_from:
77
- /release-notes/docker-compose/
88
---
99

10+
## 1.25.5
11+
(2020-04-10)
12+
13+
### Features
14+
15+
- Bumped OpenSSL from 1.1.1d to 1.1.1f.
16+
17+
- Added Compose version 3.8.
18+
19+
- Limited service scale to the size specified by the field `deploy.placement.max_replicas_per_node`.
20+
1021
## 1.25.4
1122
(2020-02-03)
1223

config/formatting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ docker inspect --format '{{join .Args " , "}}' container
2525
```
2626
{% endraw %}
2727

28+
## table
29+
30+
`table` specifies which fields you want to see its output.
31+
32+
{% raw %}
33+
```
34+
docker image list --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}"
35+
```
36+
{% endraw %}
2837

2938
## json
3039

docker-hub/webhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Docker Hub Webhooks
3-
keywords: Docker, webhookds, hub, builds
3+
keywords: Docker, webhooks, hub, builds
44
title: Docker Hub Webhooks
55
---
66

0 commit comments

Comments
 (0)