Update docs for 1.2.0
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
ed549155b3
commit
43af1684c1
6 changed files with 495 additions and 38 deletions
54
docs/yml.md
54
docs/yml.md
|
|
@ -173,8 +173,12 @@ env_file:
|
|||
- /opt/secrets.env
|
||||
```
|
||||
|
||||
Compose expects each line in an env file to be in `VAR=VAL` format. Lines
|
||||
beginning with `#` (i.e. comments) are ignored, as are blank lines.
|
||||
|
||||
```
|
||||
RACK_ENV: development
|
||||
# Set Rails/Rack environment
|
||||
RACK_ENV=development
|
||||
```
|
||||
|
||||
### extends
|
||||
|
|
@ -217,42 +221,10 @@ Here, the `web` service in **development.yml** inherits the configuration of
|
|||
the `webapp` service in **common.yml** - the `build` and `environment` keys -
|
||||
and adds `ports` and `links` configuration. It overrides one of the defined
|
||||
environment variables (DEBUG) with a new value, and the other one
|
||||
(SEND_EMAILS) is left untouched. It's exactly as if you defined `web` like
|
||||
this:
|
||||
(SEND_EMAILS) is left untouched.
|
||||
|
||||
```yaml
|
||||
web:
|
||||
build: ./webapp
|
||||
ports:
|
||||
- "8000:8000"
|
||||
links:
|
||||
- db
|
||||
environment:
|
||||
- DEBUG=true
|
||||
- SEND_EMAILS=false
|
||||
```
|
||||
|
||||
The `extends` option is great for sharing configuration between different
|
||||
apps, or for configuring the same app differently for different environments.
|
||||
You could write a new file for a staging environment, **staging.yml**, which
|
||||
binds to a different port and doesn't turn on debugging:
|
||||
|
||||
```
|
||||
web:
|
||||
extends:
|
||||
file: common.yml
|
||||
service: webapp
|
||||
ports:
|
||||
- "80:8000"
|
||||
links:
|
||||
- db
|
||||
db:
|
||||
image: postgres
|
||||
```
|
||||
|
||||
> **Note:** When you extend a service, `links` and `volumes_from`
|
||||
> configuration options are **not** inherited - you will have to define
|
||||
> those manually each time you extend it.
|
||||
For more on `extends`, see the [tutorial](extends.md#example) and
|
||||
[reference](extends.md#reference).
|
||||
|
||||
### net
|
||||
|
||||
|
|
@ -264,6 +236,16 @@ net: "none"
|
|||
net: "container:[name or id]"
|
||||
net: "host"
|
||||
```
|
||||
### pid
|
||||
|
||||
```
|
||||
pid: "host"
|
||||
```
|
||||
|
||||
Sets the PID mode to the host PID mode. This turns on sharing between
|
||||
container and the host operating system the PID address space. Containers
|
||||
launched with this flag will be able to access and manipulate other
|
||||
containers in the bare-metal machine's namespace and vise-versa.
|
||||
|
||||
### dns
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue