Skip to content

Commit

Permalink
document use of COMPOSE_PROJECT_NAME as env variable
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Nov 16, 2021
1 parent 11cfa97 commit 355447e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,18 @@ Top-level `name` property is defined by the specification as project name to be
Compose implementations MUST offer a way for user to override this name, and SHOULD define a mechanism to compute a
default project name, to be used only if the top-level `name` element is not set.

Whenever project name is defined by top-level `name` or by some custom mechanism, it MUST be exposed for
[interpolation](#Interpolation) and environment variable resolution as `COMPOSE_PROJECT_NAME`

```yml
services:
foo:
image: busybox
environment:
- COMPOSE_PROJECT_NAME
command: echo "I'm running ${COMPOSE_PROJECT_NAME}"
```

## Services top-level element

A Service is an abstract definition of a computing resource within an application which can be scaled/replaced
Expand Down

0 comments on commit 355447e

Please sign in to comment.