Skip to content

Commit dcf374c

Browse files
committed
introduce service.external
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent dcbe293 commit dcf374c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec.md

+22
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,28 @@ duplicates resulting from the merge are not removed.
10311031

10321032
Any other allowed keys in the service definition should be treated as scalars.
10331033

1034+
### external
1035+
1036+
If set to `true`, `external` specifies that this service lifecycle is maintained outside of that application defined
1037+
this the Compose file. Compose Implementations SHOULD NOT attempt to create container(s) for this service.
1038+
1039+
In the example below, `db` is a database service managed on a cloud infrastructure. Instead of attempting to create
1040+
this service as a container, Compose implementations SHOULD consider this service as available for dependent services.
1041+
1042+
This attribute is expected to be used in a Compose override file to replace a service definition with an external resource.
1043+
1044+
```yaml
1045+
services:
1046+
app:
1047+
image: mycompay/app
1048+
depends_on:
1049+
- db
1050+
db:
1051+
external: true
1052+
container_name: database.cloud.provider
1053+
```
1054+
1055+
10341056
### external_links
10351057

10361058
`external_links` link service containers to services managed outside this Compose application.

0 commit comments

Comments
 (0)