Commit 1c514868169d19d729e8d65caa4886e7e86f9a2a

Authored by Sytse Sijbrandij
2 parents 9d9cb8bf 3a86cabd

Merge branch 'change_gitlab_yml' into 'master'

Explain how to get to gitlab.yml via gitlab.rb
Showing 1 changed file with 30 additions and 0 deletions   Show diff stats
README.md
... ... @@ -184,6 +184,35 @@ sudo lokkit -p 2443:tcp
184 184  
185 185 Run `sudo gitlab-ctl reconfigure` for the change to take effect.
186 186  
  187 +### Changing gitlab.yml settings
  188 +
  189 +This is an advanced topic. If you are already familiar with configuring GitLab
  190 +and you want to change a `gitlab.yml` setting, you need to do so via
  191 +`/etc/gitlab/gitlab.rb`. The translation works as follows.
  192 +
  193 +In `gitlab.yml`, you will find structure like this:
  194 +
  195 +```yaml
  196 +production: &base
  197 + gitlab:
  198 + default_projects_limit: 10
  199 +```
  200 +
  201 +In `gitlab.rb`, this translates to:
  202 +
  203 +```ruby
  204 +gitlab_rails['gitlab_default_projects_limit'] = 10
  205 +```
  206 +
  207 +What happens here is that we forget about `production: &base`, and join
  208 +`gitlab:` with `default_projects_limit:` into `gitlab_default_projects_limit`.
  209 +Note that not all `gitlab.yml` settings can be changed via `gitlab.rb` yet; see
  210 +the [gitlab.yml ERB template][gitlab.yml.erb]. If you think an attribute is
  211 +missing please create a merge request or an issue on the omnibus-gitlab issue
  212 +tracker.
  213 +
  214 +Run `sudo gitlab-ctl reconfigure` for changes in `gitlab.rb` to take effect.
  215 +
187 216 ## Backups
188 217  
189 218 ### Creating an application backup
... ... @@ -291,3 +320,4 @@ This omnibus installer project is based on the awesome work done by Chef in
291 320 [downloads]: https://www.gitlab.com/downloads
292 321 [CE README]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md
293 322 [omnibus-chef-server]: https://github.com/opscode/omnibus-chef-server
  323 +[gitlab.yml.erb]: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
... ...