mirror of https://github.com/docker/docs.git
Merge pull request #11406 from thaJeztah/compose_highlighting
compose: add highlighting and automate version for compose-file
This commit is contained in:
commit
bba4fa627e
|
@ -30,21 +30,23 @@ so they can be run together in an isolated environment.
|
||||||
|
|
||||||
A `docker-compose.yml` looks like this:
|
A `docker-compose.yml` looks like this:
|
||||||
|
|
||||||
version: '3'
|
```yaml
|
||||||
services:
|
version: "{{ site.compose_file_v3 }}"
|
||||||
web:
|
services:
|
||||||
build: .
|
web:
|
||||||
ports:
|
build: .
|
||||||
- "5000:5000"
|
ports:
|
||||||
volumes:
|
- "5000:5000"
|
||||||
- .:/code
|
|
||||||
- logvolume01:/var/log
|
|
||||||
links:
|
|
||||||
- redis
|
|
||||||
redis:
|
|
||||||
image: redis
|
|
||||||
volumes:
|
volumes:
|
||||||
logvolume01: {}
|
- .:/code
|
||||||
|
- logvolume01:/var/log
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
volumes:
|
||||||
|
logvolume01: {}
|
||||||
|
```
|
||||||
|
|
||||||
For more information about the Compose file, see the
|
For more information about the Compose file, see the
|
||||||
[Compose file reference](compose-file/index.md).
|
[Compose file reference](compose-file/index.md).
|
||||||
|
@ -150,9 +152,11 @@ is the automated test suite. Automated end-to-end testing requires an
|
||||||
environment in which to run tests. Compose provides a convenient way to create
|
environment in which to run tests. Compose provides a convenient way to create
|
||||||
and destroy isolated testing environments for your test suite. By defining the full environment in a [Compose file](compose-file/index.md), you can create and destroy these environments in just a few commands:
|
and destroy isolated testing environments for your test suite. By defining the full environment in a [Compose file](compose-file/index.md), you can create and destroy these environments in just a few commands:
|
||||||
|
|
||||||
$ docker-compose up -d
|
```bash
|
||||||
$ ./run_tests
|
$ docker-compose up -d
|
||||||
$ docker-compose down
|
$ ./run_tests
|
||||||
|
$ docker-compose down
|
||||||
|
```
|
||||||
|
|
||||||
### Single host deployments
|
### Single host deployments
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue