Commit 1e7156ed authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Use the name of the linked containers instead of localhost

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1917#note_2833978
parent b312edaf
...@@ -24,12 +24,15 @@ variables: ...@@ -24,12 +24,15 @@ variables:
And then configure your application to use the database, for example: And then configure your application to use the database, for example:
```yaml ```yaml
Host: localhost Host: mysql
User: root User: root
Password: mysql_strong_password Password: mysql_strong_password
Database: el_duderino Database: el_duderino
``` ```
If you are wondering why we used `mysql` for the `Host`, read more at
[How is service linked to the build](../docker/using_docker_images.md#how-is-service-linked-to-the-build).
You can also use any other docker image available on [Docker Hub][hub-mysql]. You can also use any other docker image available on [Docker Hub][hub-mysql].
For example, to use MySQL 5.5 the service becomes `mysql:5.5`. For example, to use MySQL 5.5 the service becomes `mysql:5.5`.
......
...@@ -24,12 +24,15 @@ variables: ...@@ -24,12 +24,15 @@ variables:
And then configure your application to use the database, for example: And then configure your application to use the database, for example:
```yaml ```yaml
Host: localhost Host: postgres
User: runner User: runner
Password: Password:
Database: nice_marmot Database: nice_marmot
``` ```
If you are wondering why we used `postgres` for the `Host`, read more at
[How is service linked to the build](../docker/using_docker_images.md#how-is-service-linked-to-the-build).
You can also use any other docker image available on [Docker Hub][hub-pg]. You can also use any other docker image available on [Docker Hub][hub-pg].
For example, to use PostgreSQL 9.3 the service becomes `postgres:9.3`. For example, to use PostgreSQL 9.3 the service becomes `postgres:9.3`.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment