From 811cb8a8560cde62b66596959623cecd1b485c8c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 5 Aug 2015 12:30:34 +0200 Subject: Update documentation --- doc/docker/using_docker_images.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'doc/docker') diff --git a/doc/docker/using_docker_images.md b/doc/docker/using_docker_images.md index a88bb62..9170783 100644 --- a/doc/docker/using_docker_images.md +++ b/doc/docker/using_docker_images.md @@ -66,6 +66,39 @@ Alias hostname for the service is made from the image name: 1. Everything after `:` is stripped, 2. '/' is replaced to `_`. +### Configuring services +Many services accepts environment variables, thus allowing to change database name or set account name. + +GitLab Runner with version equal or greater than 0.5.0 passes all YAML-defined variables to created service containers. + +1. To configure database name for [postgres](https://registry.hub.docker.com/u/library/postgres/) service, +you need to set POSTGRES_DB. + + ```yaml + services: + - postgres + + variables: + POSTGRES_DB: gitlab + ``` + +1. To use [mysql](https://registry.hub.docker.com/u/library/mysql/) service with empty password for time of build, +you need to set MYSQL_ALLOW_EMPTY_PASSWORD. + + ```yaml + services: + - mysql + + variables: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + ``` + +For more possible configuration variables check the +https://registry.hub.docker.com/u/library/mysql/ or https://registry.hub.docker.com/u/library/postgres/ +or README page for any other Docker image. + +**Note: All variables will passed to all service containers. It's not designed to distinguish which variable should go where.** + ### Overwrite image and services It's possible to overwrite `docker-image` and specify services from `.gitlab-ci.yml`. If you add to your YAML the `image` and the `services` these parameters -- cgit v1.2.1