surface Compose file example at top of topic (#4090)

* surface Compose file example at top of topic

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* removed extraneous intro

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
This commit is contained in:
Victoria Bialas 2017-08-03 21:22:47 -07:00 committed by GitHub
parent e53eab31e8
commit 4be0abd93b
1 changed files with 21 additions and 22 deletions

View File

@ -24,28 +24,6 @@ how to upgrade, see **[About versions and upgrading](compose-versioning.md)**.
## Compose file structure and examples
The topics on this reference page are organized alphabetically by top-level key
to reflect the structure of the Compose file itself. Top-level keys that define
a section in the configuration file such as `build`, `deploy`, `depends_on`,
`networks`, and so on, are listed with the options that support them as
sub-topics. This maps to the `<key>: <option>: <value>` indent structure of the
Compose file.
A good place to start is the [Getting Started](/get-started/index.md) tutorial
which uses version 3 Compose stack files to implement multi-container apps,
service definitions, and swarm mode. Here are some Compose files used in the
tutorial.
- [Your first docker-compose.yml File](/get-started/part3.md#your-first-docker-composeyml-file)
- [Adding a new service and redeploying](/get-started/part5.md#adding-a-new-service-and-redeploying)
Another good example is the Compose file for the voting app sample used in the
[Docker for Beginners lab](https://github.com/docker/labs/tree/master/beginner/)
topic on [Deploying an app to a
Swarm](https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md).
Click to show/hide the example Compose file below.
<div class="panel panel-default">
<div class="panel-heading collapsed" data-toggle="collapse" data-target="#collapseSample1" style="cursor: pointer">
Example Compose file version 3
@ -145,6 +123,27 @@ volumes:
</div>
</div>
The topics on this reference page are organized alphabetically by top-level key
to reflect the structure of the Compose file itself. Top-level keys that define
a section in the configuration file such as `build`, `deploy`, `depends_on`,
`networks`, and so on, are listed with the options that support them as
sub-topics. This maps to the `<key>: <option>: <value>` indent structure of the
Compose file.
A good place to start is the [Getting Started](/get-started/index.md) tutorial
which uses version 3 Compose stack files to implement multi-container apps,
service definitions, and swarm mode. Here are some Compose files used in the
tutorial.
- [Your first docker-compose.yml File](/get-started/part3.md#your-first-docker-composeyml-file)
- [Adding a new service and redeploying](/get-started/part5.md#adding-a-new-service-and-redeploying)
Another good reference is the Compose file for the voting app sample used in the
[Docker for Beginners lab](https://github.com/docker/labs/tree/master/beginner/)
topic on [Deploying an app to a
Swarm](https://github.com/docker/labs/blob/master/beginner/chapters/votingapp.md). This is also shown on the accordion at the top of this section.
## Service configuration reference
The Compose file is a [YAML](http://yaml.org/) file defining