Configuring source installations

The main configuration file to change is gitlab.yml, which is usually found in /home/git/gitlab/config. It follows the .yml standard and this has several implications. The first one is that indentation is very important. If you just copy and paste configuration, you will find that it can mess up the file contents. Another important feature that is used in the gitlab.yml file is utilizing anchors and aliases (&base) to specify different configuration targets. In practice, this means that the main configuration for all environments is specified in the config file (production: &base).

Below the production: &base target , the other environments are specified, and they refer to &base but override certain key-value pairs. How does GitLab know which environment information should be used? That is determined by the RAILS_ENV variable used when installing and starting GitLab.

We have put an example configuration file in repository of this book (https://github.com/PacktPublishing/Mastering-GitLab-12/blob/master/Chapter04/config_gitlab.yml.example).

The configuration file has several sections, and we'll run through them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.175.180