Use the name of the linked containers instead of localhost
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1917#note_2833978
This commit is contained in:
parent
b312edaf44
commit
1e7156ed70
|
@ -24,12 +24,15 @@ variables:
|
|||
And then configure your application to use the database, for example:
|
||||
|
||||
```yaml
|
||||
Host: localhost
|
||||
Host: mysql
|
||||
User: root
|
||||
Password: mysql_strong_password
|
||||
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].
|
||||
For example, to use MySQL 5.5 the service becomes `mysql:5.5`.
|
||||
|
||||
|
|
|
@ -24,12 +24,15 @@ variables:
|
|||
And then configure your application to use the database, for example:
|
||||
|
||||
```yaml
|
||||
Host: localhost
|
||||
Host: postgres
|
||||
User: runner
|
||||
Password:
|
||||
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].
|
||||
For example, to use PostgreSQL 9.3 the service becomes `postgres:9.3`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue