From 59e31ff5448a2b197503a320b470014dc92da83b Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Fri, 8 Aug 2014 11:00:10 -0700 Subject: [PATCH] Update docs to remove numeric suffix Signed-off-by: Aanand Prasad --- docs/cli.md | 2 +- docs/django.md | 2 +- docs/env.md | 12 ++++++------ docs/index.md | 2 +- docs/rails.md | 2 +- docs/wordpress.md | 2 +- docs/yml.md | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index 21545da7a..8e1c50464 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -51,7 +51,7 @@ One-off commands are started in new containers with the same config as a normal Links are also created between one-off commands and the other containers for that service so you can do stuff like this: - $ fig run db psql -h db_1 -U postgres + $ fig run db psql -h db -U docker If you do not want linked containers to be started when running the one-off command, specify the `--no-deps` flag: diff --git a/docs/django.md b/docs/django.md index 52b9cd2ec..e2bfbde17 100644 --- a/docs/django.md +++ b/docs/django.md @@ -59,7 +59,7 @@ First thing we need to do is set up the database connection. Replace the `DATABA 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'postgres', 'USER': 'postgres', - 'HOST': 'db_1', + 'HOST': 'db', 'PORT': 5432, } } diff --git a/docs/env.md b/docs/env.md index d9379bb42..ee5c9c1c8 100644 --- a/docs/env.md +++ b/docs/env.md @@ -6,26 +6,26 @@ title: Fig environment variables reference Environment variables reference =============================== -**Note:** Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, name_1) as the hostname to connect to. See the [fig.yml documentation](yml.html#links) for details. +**Note:** Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the [fig.yml documentation](yml.html#links) for details. Fig uses [Docker links] to expose services' containers to one another. Each linked container injects a set of environment variables, each of which begins with the uppercase name of the container. To see what environment variables are available to a service, run `fig run SERVICE env`. name\_PORT
-Full URL, e.g. `DB_1_PORT=tcp://172.17.0.5:5432` +Full URL, e.g. `DB_PORT=tcp://172.17.0.5:5432` name\_PORT\_num\_protocol
-Full URL, e.g. `DB_1_PORT_5432_TCP=tcp://172.17.0.5:5432` +Full URL, e.g. `DB_PORT_5432_TCP=tcp://172.17.0.5:5432` name\_PORT\_num\_protocol\_ADDR
-Container's IP address, e.g. `DB_1_PORT_5432_TCP_ADDR=172.17.0.5` +Container's IP address, e.g. `DB_PORT_5432_TCP_ADDR=172.17.0.5` name\_PORT\_num\_protocol\_PORT
-Exposed port number, e.g. `DB_1_PORT_5432_TCP_PORT=5432` +Exposed port number, e.g. `DB_PORT_5432_TCP_PORT=5432` name\_PORT\_num\_protocol\_PROTO
-Protocol (tcp or udp), e.g. `DB_1_PORT_5432_TCP_PROTO=tcp` +Protocol (tcp or udp), e.g. `DB_PORT_5432_TCP_PROTO=tcp` name\_NAME
Fully qualified container name, e.g. `DB_1_NAME=/myapp_web_1/myapp_db_1` diff --git a/docs/index.md b/docs/index.md index 496dea958..ef0a77f0c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -59,7 +59,7 @@ from flask import Flask from redis import Redis import os app = Flask(__name__) -redis = Redis(host="redis_1", port=6379) +redis = Redis(host='redis', port=6379) @app.route('/') def hello(): diff --git a/docs/rails.md b/docs/rails.md index a4e950457..5ead07e58 100644 --- a/docs/rails.md +++ b/docs/rails.md @@ -73,7 +73,7 @@ Open up your newly-generated `database.yml`. Replace its contents with the follo pool: 5 username: postgres password: - host: db_1 + host: db test: <<: *default diff --git a/docs/wordpress.md b/docs/wordpress.md index c06eda676..47e8e443a 100644 --- a/docs/wordpress.md +++ b/docs/wordpress.md @@ -44,7 +44,7 @@ Two supporting files are needed to get this working - first up, `wp-config.php` define('DB_NAME', 'wordpress'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); -define('DB_HOST', "db_1:3306"); +define('DB_HOST', "db:3306"); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); diff --git a/docs/yml.md b/docs/yml.md index ea1dd4205..15709f9a8 100644 --- a/docs/yml.md +++ b/docs/yml.md @@ -39,7 +39,7 @@ command: bundle exec thin -p 3000 ### 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_PORT` +Link to containers in another service. Either specify both the service name and the link alias (`SERVICE:ALIAS`), or just the service name (which will also be used for the alias). ``` links: @@ -51,9 +51,9 @@ links: 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 db 172.17.2.186 database -172.17.2.187 redis_1 +172.17.2.187 redis ``` Environment variables will also be created - see the [environment variable reference](env.html) for details.