gitlab.yml.erb 9.64 KB
Newer Older
1
# # # # # # # # # # # # # # # # # #
ogom's avatar
ogom committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# GitLab application config file  #
# # # # # # # # # # # # # # # # # #
#
# How to use:
# 1. copy file as gitlab.yml
# 2. Replace gitlab -> host with your domain
# 3. Replace gitlab -> email_from

production: &base
  #
  # 1. GitLab app settings
  # ==========================

  ## GitLab settings
  gitlab:
Marin Jankovski's avatar
Marin Jankovski committed
17
    ## Web server settings (note: host is the FQDN, do not include http://)
ogom's avatar
ogom committed
18 19
    host: <%= @host %>
    port: <%= @port %>
20
    https: <%= @port == "443" ? true : false %>
ogom's avatar
ogom committed
21

Marin Jankovski's avatar
Marin Jankovski committed
22 23 24 25 26 27 28
    # Uncommment this line below if your ssh host is different from HTTP/HTTPS one
    # (you'd obviously need to replace ssh.host_example.com with your own host).
    # Otherwise, ssh host will be set to the `host:` value above
    # ssh_host: ssh.host_example.com

    # WARNING: See config/application.rb under "Relative url support" for the list of
    # other files that need to be changed for relative url support
ogom's avatar
ogom committed
29 30 31
    # relative_url_root: /gitlab

    # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
32
    user: <%= @user %>
ogom's avatar
ogom committed
33 34 35 36 37 38 39 40

    ## Email settings
    # Email address used in the "From" field in mails sent by GitLab
    email_from: <%= @email_from %>

    # Email address of your support contact (default: same as email_from)
    support_email: <%= @support_email %>

ogom's avatar
ogom committed
41
    ## User settings
42
    default_projects_limit: <%= @projects_limit %>
ogom's avatar
ogom committed
43
    # default_can_create_group: false  # default: true
ogom's avatar
ogom committed
44
    # username_changing_enabled: false # default: true - User can change her username/namespace
Marin Jankovski's avatar
Marin Jankovski committed
45 46 47 48 49 50 51
    ## Default theme
    ##   BASIC  = 1
    ##   MARS   = 2
    ##   MODERN = 3
    ##   GRAY   = 4
    ##   COLOR  = 5
    # default_theme: 2 # default: 2
ogom's avatar
ogom committed
52

Marin Jankovski's avatar
Marin Jankovski committed
53

ogom's avatar
ogom committed
54
    ## Users management
Marin Jankovski's avatar
Marin Jankovski committed
55
    # default: false - Account passwords are not sent via the email if signup is enabled.
56
    signup_enabled: <%= @signup_enabled %>
57
    #
58 59 60
    # default: true - If set to false, standard login form won't be shown on the sign-in page
    # signin_enabled: false

ogom's avatar
ogom committed
61

62 63 64 65
    # Restrict setting visibility levels for non-admin users.
    # The default is to allow all levels.
    #restricted_visibility_levels: [ "public" ]

ogom's avatar
ogom committed
66
    ## Automatic issue closing
67
    # If a commit message matches this regular expression, all issues referenced from the matched text will be closed.
Marin Jankovski's avatar
Marin Jankovski committed
68 69
    # This happens when the commit is pushed or merged into the default branch of a project.
    # When not specified the default issue_closing_pattern as specified below will be used.
70
    # issue_closing_pattern: '([Cc]lose[sd]|[Ff]ixe[sd]) #(\d+)'
ogom's avatar
ogom committed
71

ogom's avatar
ogom committed
72 73
    ## Default project features settings
    default_projects_features:
74 75 76 77 78 79
      issues: <%= @default_projects_features['issues'] %>
      merge_requests: <%= @default_projects_features['merge_requests'] %>
      wiki: <%= @default_projects_features['wiki'] %>
      wall: <%= @default_projects_features['wall'] %>
      snippets: <%= @default_projects_features['snippets'] %>
      visibility_level: "<%= @default_projects_features['visibility_level'] %>"  # can be "private" | "internal" | "public"
ogom's avatar
ogom committed
80

81 82 83 84 85
    ## Repository downloads directory
    # When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
    # The default is 'tmp/repositories' relative to the root of the Rails app.
    # repository_downloads_path: tmp/repositories

ogom's avatar
ogom committed
86 87 88
  ## External issues trackers
  issues_tracker:
    # redmine:
Marin Jankovski's avatar
Marin Jankovski committed
89
    #   title: "Redmine"
ogom's avatar
ogom committed
90 91 92 93 94 95 96 97 98 99 100 101 102
    #   ## If not nil, link 'Issues' on project page will be replaced with this
    #   ## Use placeholders:
    #   ##  :project_id        - GitLab project identifier
    #   ##  :issues_tracker_id - Project Name or Id in external issue tracker
    #   project_url: "http://redmine.sample/projects/:issues_tracker_id"
    #
    #   ## If not nil, links from /#\d/ entities from commit messages will replaced with this
    #   ## Use placeholders:
    #   ##  :project_id        - GitLab project identifier
    #   ##  :issues_tracker_id - Project Name or Id in external issue tracker
    #   ##  :id                - Issue id (from commit messages)
    #   issues_url: "http://redmine.sample/issues/:id"
    #
Marin Jankovski's avatar
Marin Jankovski committed
103
    #   ## If not nil, links to creating new issues will be replaced with this
ogom's avatar
ogom committed
104 105 106 107
    #   ## Use placeholders:
    #   ##  :project_id        - GitLab project identifier
    #   ##  :issues_tracker_id - Project Name or Id in external issue tracker
    #   new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
108
    #
ogom's avatar
ogom committed
109
    # jira:
Marin Jankovski's avatar
Marin Jankovski committed
110
    #   title: "Atlassian Jira"
ogom's avatar
ogom committed
111 112 113
    #   project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
    #   issues_url: "http://jira.sample/browse/:id"
    #   new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"
ogom's avatar
ogom committed
114 115 116

  ## Gravatar
  gravatar:
117
    enabled: <%= @gravatar %>      # Use user avatar image from Gravatar.com (default: true)
ogom's avatar
ogom committed
118 119 120 121 122 123 124 125
    # plain_url: "http://..."     # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
    # ssl_url:   "https://..."    # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm

  #
  # 2. Auth settings
  # ==========================

  ## LDAP settings
Marin Jankovski's avatar
Marin Jankovski committed
126
  # You can inspect a sample of the LDAP users with login access by running:
Marin Jankovski's avatar
Marin Jankovski committed
127
  #   bundle exec rake gitlab:ldap:check RAILS_ENV=production
ogom's avatar
ogom committed
128
  ldap:
129 130 131 132 133 134 135
    enabled: <%= @ldap_config["enabled"] %>
    host: '<%= @ldap_config["host"] %>'
    port: <%= @ldap_config["port"] %>
    uid: '<%= @ldap_config["uid"] %>'
    method: '<%= @ldap_config["method"] %>' # "ssl" or "plain"
    bind_dn: '<%= @ldap_config["bind_dn"] %>'
    password: '<%= @ldap_config["password"] %>'
Marin Jankovski's avatar
Marin Jankovski committed
136 137 138 139 140 141 142 143 144
    # If allow_username_or_email_login is enabled, GitLab will ignore everything
    # after the first '@' in the LDAP username submitted by the user on login.
    #
    # Example:
    # - the user enters 'jane.doe@example.com' and 'p@ssw0rd' as LDAP credentials;
    # - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'.
    #
    # If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
    # disable this setting, because the userPrincipalName contains an '@'.
145
    allow_username_or_email_login: <%= @ldap_config["allow_username_or_email_login"] %>
ogom's avatar
ogom committed
146

Marin Jankovski's avatar
Marin Jankovski committed
147 148 149 150
    # Base where we can search for users
    #
    #   Ex. ou=People,dc=gitlab,dc=example
    #
Marin Jankovski's avatar
Marin Jankovski committed
151
    base: '<%= @ldap_config["base"] %>'
Marin Jankovski's avatar
Marin Jankovski committed
152 153 154 155 156 157 158 159 160

    # Filter LDAP users
    #
    #   Format: RFC 4515
    #   Ex. (employeeType=developer)
    #
    user_filter: ''


ogom's avatar
ogom committed
161 162 163
  ## OmniAuth settings
  omniauth:
    # Allow login via Twitter, Google, etc. using OmniAuth providers
Marin Jankovski's avatar
Marin Jankovski committed
164
    enabled: <%= @oauth_enabled %>
ogom's avatar
ogom committed
165 166 167 168

    # CAUTION!
    # This allows users to login without having a user account first (default: false).
    # User accounts will be created automatically when authentication was successful.
169
    allow_single_sign_on: <%= @oauth_allow_single_sign_on %>
ogom's avatar
ogom committed
170
    # Locks down those users until they have been cleared by the admin (default: true).
Marin Jankovski's avatar
Marin Jankovski committed
171
    block_auto_created_users: <%= @oauth_block_auto_created_users %>
ogom's avatar
ogom committed
172 173 174 175

    ## Auth providers
    # Uncomment the following lines and fill in the data of the auth provider you want to use
    # If your favorite auth provider is not listed you can use others:
Marin Jankovski's avatar
Marin Jankovski committed
176
    # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Working-custom-omniauth-provider-configurations
ogom's avatar
ogom committed
177 178
    # The 'app_id' and 'app_secret' parameters are always passed as the first two
    # arguments, followed by optional 'args' which can be either a hash or an array.
179
    # Documentation for this is available at http://doc.gitlab.com/ce/integration/omniauth.html
ogom's avatar
ogom committed
180
    providers:
Marin Jankovski's avatar
Marin Jankovski committed
181 182 183
    <% @oauth_providers.each do |provider| %>
      - { name: '<%= provider['name'] -%>', app_id: '<%= provider['app_id'] -%>', app_secret: '<%= provider['app_secret'] -%>' <%= ", args: { #{provider['args']} } " if provider['args'] %>}
    <% end %>
ogom's avatar
ogom committed
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200

  #
  # 3. Advanced settings
  # ==========================

  # GitLab Satellites
  satellites:
    # Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
    path: <%= @satellites_path %>/

  ## Backup settings
  backup:
    path: "tmp/backups"   # Relative paths are relative to Rails.root (default: tmp/backups/)
    # keep_time: 604800   # default: 0 (forever) (in seconds)

  ## GitLab Shell settings
  gitlab_shell:
Marin Jankovski's avatar
Marin Jankovski committed
201
    path: <%= @shell_path %>/
202

ogom's avatar
ogom committed
203 204 205 206 207 208 209 210 211
    # REPOS_PATH MUST NOT BE A SYMLINK!!!
    repos_path: <%= @repos_path %>/
    hooks_path: <%= File.join(@shell_path, 'hooks') %>/

    # Git over HTTP
    upload_pack: true
    receive_pack: true

    # If you use non-standard ssh port you need to specify it
212
    ssh_port: <%= @ssh_port =%>
ogom's avatar
ogom committed
213 214 215 216 217 218

  ## Git settings
  # CAUTION!
  # Use the default values unless you really know what you are doing
  git:
    bin_path: <%= node['gitlab']['git_path'] %>
Marin Jankovski's avatar
Marin Jankovski committed
219 220
    # The next value is the maximum memory size grit can use
    # Given in number of bytes per git object (e.g. a commit)
ogom's avatar
ogom committed
221
    # This value can be increased if you have very large commits
222
    max_size: <%= @max_size %>
ogom's avatar
ogom committed
223 224 225 226 227 228 229
    # Git timeout to read a commit, in seconds
    timeout: 10

  #
  # 4. Extra customization
  # ==========================

230
  extra:
ogom's avatar
ogom committed
231
    ## Google analytics. Uncomment if you want it
Marin Jankovski's avatar
Marin Jankovski committed
232
    <%= "google_analytics_id: '#{ @google_analytics_id }'" unless @google_analytics_id.empty? %>
ogom's avatar
ogom committed
233

Marin Jankovski's avatar
Marin Jankovski committed
234 235 236 237
    ## Piwik analytics.
    # piwik_url: '_your_piwik_url'
    # piwik_site_id: '_your_piwik_site_id'

ogom's avatar
ogom committed
238
    ## Text under sign-in page (Markdown enabled)
Marin Jankovski's avatar
Marin Jankovski committed
239 240
    <%= "sign_in_text: |
          #{ @sign_in_text }" unless @sign_in_text.empty? %>
ogom's avatar
ogom committed
241 242 243 244 245 246

development:
  <<: *base

test:
  <<: *base
Marin Jankovski's avatar
Marin Jankovski committed
247 248 249 250 251
  gravatar:
    enabled: true
  gitlab:
    host: localhost
    port: 80
ogom's avatar
ogom committed
252 253
  issues_tracker:
    redmine:
Marin Jankovski's avatar
Marin Jankovski committed
254
      title: "Redmine"
ogom's avatar
ogom committed
255 256 257 258 259 260
      project_url: "http://redmine/projects/:issues_tracker_id"
      issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
      new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"

staging:
  <<: *base