mirror of https://github.com/docker/docs.git
clarified use of .yml and .yaml for Compose file, both can be used
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
This commit is contained in:
parent
af1a2bf340
commit
a259f45166
|
@ -12,6 +12,8 @@ The Compose file is a [YAML](http://yaml.org/) file defining
|
||||||
[volumes](compose-file.md#volume-configuration-reference).
|
[volumes](compose-file.md#volume-configuration-reference).
|
||||||
The default path for a Compose file is `./docker-compose.yml`.
|
The default path for a Compose file is `./docker-compose.yml`.
|
||||||
|
|
||||||
|
>**Tip:** You can use either a `.yml` or `.yaml` extension for this file. They both work.
|
||||||
|
|
||||||
A service definition contains configuration which will be applied to each
|
A service definition contains configuration which will be applied to each
|
||||||
container started for that service, much like passing command-line parameters to
|
container started for that service, much like passing command-line parameters to
|
||||||
`docker run`. Likewise, network and volume definitions are analogous to
|
`docker run`. Likewise, network and volume definitions are analogous to
|
||||||
|
@ -1309,4 +1311,4 @@ If you forget and use a single dollar sign (`$`), Compose interprets the value a
|
||||||
- [Get started with Django](django.md)
|
- [Get started with Django](django.md)
|
||||||
- [Get started with Rails](rails.md)
|
- [Get started with Rails](rails.md)
|
||||||
- [Get started with WordPress](wordpress.md)
|
- [Get started with WordPress](wordpress.md)
|
||||||
- [Command line reference](./reference/index.md)
|
- [Command line reference](./reference/index.md)
|
||||||
|
|
|
@ -10,7 +10,7 @@ This quick-start guide demonstrates how to use Docker Compose to set up and run
|
||||||
### Define the project components
|
### Define the project components
|
||||||
|
|
||||||
For this project, you need to create a Dockerfile, a Python dependencies file,
|
For this project, you need to create a Dockerfile, a Python dependencies file,
|
||||||
and a `docker-compose.yml` file.
|
and a `docker-compose.yml` file. (You can use either a `.yml` or `.yaml` extension for this file.)
|
||||||
|
|
||||||
1. Create an empty project directory.
|
1. Create an empty project directory.
|
||||||
|
|
||||||
|
@ -183,4 +183,4 @@ In this section, you set up the database connection for Django.
|
||||||
- [Get started with Rails](rails.md)
|
- [Get started with Rails](rails.md)
|
||||||
- [Get started with WordPress](wordpress.md)
|
- [Get started with WordPress](wordpress.md)
|
||||||
- [Command line reference](./reference/index.md)
|
- [Command line reference](./reference/index.md)
|
||||||
- [Compose file reference](compose-file.md)
|
- [Compose file reference](compose-file.md)
|
||||||
|
|
|
@ -56,6 +56,9 @@ to link them together and expose the web app's port.
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
|
>**Tip:** You can use either a `.yml` or `.yaml` extension for this file.
|
||||||
|
|
||||||
|
|
||||||
### Build the project
|
### Build the project
|
||||||
|
|
||||||
With those three files in place, you can now generate the Rails skeleton app
|
With those three files in place, you can now generate the Rails skeleton app
|
||||||
|
@ -163,4 +166,4 @@ up`.
|
||||||
- [Get started with Django](django.md)
|
- [Get started with Django](django.md)
|
||||||
- [Get started with WordPress](wordpress.md)
|
- [Get started with WordPress](wordpress.md)
|
||||||
- [Command line reference](./reference/index.md)
|
- [Command line reference](./reference/index.md)
|
||||||
- [Compose file reference](compose-file.md)
|
- [Compose file reference](compose-file.md)
|
||||||
|
|
|
@ -4,8 +4,9 @@ keywords: documentation, docs, docker, compose, orchestration, containers
|
||||||
title: "Quickstart: Compose and WordPress"
|
title: "Quickstart: Compose and WordPress"
|
||||||
---
|
---
|
||||||
|
|
||||||
You can use Docker Compose to easily run WordPress in an isolated environment built
|
You can use Docker Compose to easily run WordPress in an isolated environment
|
||||||
with Docker containers. This quick-start guide demonstrates how to use Compose to set up and run WordPress. Before starting, you'll need to have
|
built with Docker containers. This quick-start guide demonstrates how to use
|
||||||
|
Compose to set up and run WordPress. Before starting, you'll need to have
|
||||||
[Compose installed](install.md).
|
[Compose installed](install.md).
|
||||||
|
|
||||||
### Define the project
|
### Define the project
|
||||||
|
@ -14,7 +15,10 @@ with Docker containers. This quick-start guide demonstrates how to use Compose t
|
||||||
|
|
||||||
You can name the directory something easy for you to remember. This directory is the context for your application image. The directory should only contain resources to build that image.
|
You can name the directory something easy for you to remember. This directory is the context for your application image. The directory should only contain resources to build that image.
|
||||||
|
|
||||||
This project directory will contain a `docker-compose.yaml` file which will be complete in itself for a good starter wordpress project.
|
This project directory will contain a `docker-compose.yml` file which will
|
||||||
|
be complete in itself for a good starter wordpress project.
|
||||||
|
|
||||||
|
>**Tip:** You can use either a `.yml` or `.yaml` extension for this file. They both work.
|
||||||
|
|
||||||
2. Change directories into your project directory.
|
2. Change directories into your project directory.
|
||||||
|
|
||||||
|
@ -87,17 +91,22 @@ This pulls the needed images, and starts the wordpress and database containers,
|
||||||
|
|
||||||
If you're using [Docker Machine](/machine/), then `docker-machine ip MACHINE_VM` gives you the machine address and you can open `http://MACHINE_VM_IP:8000` in a browser.
|
If you're using [Docker Machine](/machine/), then `docker-machine ip MACHINE_VM` gives you the machine address and you can open `http://MACHINE_VM_IP:8000` in a browser.
|
||||||
|
|
||||||
At this point, WordPress should be running on port `8000` of your Docker Host, and you can complete the "famous five-minute installation" as a WordPress administrator.
|
At this point, WordPress should be running on port `8000` of your Docker Host,
|
||||||
|
and you can complete the "famous five-minute installation" as a WordPress
|
||||||
|
administrator.
|
||||||
|
|
||||||
**NOTE**: The WordPress site will not be immediately available on port `8000` because the containers are still being initialized and may take a couple of minutes before the first load.
|
**NOTE**: The WordPress site will not be immediately available on port `8000`
|
||||||
|
because the containers are still being initialized and may take a couple of
|
||||||
|
minutes before the first load.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Shutdown/Clean up
|
### Shutdown/Clean up
|
||||||
`docker-compose down` will remove the containers and default network, but preserve your wordpress database.
|
`docker-compose down` will remove the containers and default network, but
|
||||||
`docker-compose down --volumes` will remove the containers, default network, and the wordpress database.
|
preserve your wordpress database. `docker-compose down --volumes` will remove
|
||||||
|
the containers, default network, and the wordpress database.
|
||||||
|
|
||||||
## More Compose documentation
|
## More Compose documentation
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue