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...