|
|
@@ -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).
|