Use hostnames everywhere in docs, add YAML note and deprecate env.md

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2014-08-08 10:59:08 -07:00
commit 73bd4aca74
4 changed files with 16 additions and 4 deletions

View file

@ -36,10 +36,10 @@ Override the default command.
command: bundle exec thin -p 3000
```
<a name="links"></a>
### links
Link to containers in another service. Optionally specify an alternate name for the link, which will determine how environment variables are prefixed, e.g. `db` -> `DB_1_PORT`, `db:database` -> `DATABASE_1_PORT`
Link to containers in another service. Optionally specify an alternate name for the link, which will determine how environment variables are prefixed, e.g. `db` -> `DB_1_PORT`, `db:database` -> `DATABASE_PORT`
```
links:
@ -48,6 +48,16 @@ links:
- redis
```
An entry with the alias' name will be created in `/etc/hosts` inside containers for this service, e.g:
```
172.17.2.186 db_1
172.17.2.186 database
172.17.2.187 redis_1
```
Environment variables will also be created - see the [environment variable reference](env.html) for details.
### ports
Expose ports. Either specify both ports (`HOST:CONTAINER`), or just the container port (a random host port will be chosen).