Commit abad0f11d8c77c63e4a6a1326cfcd49c1a70c2e6

Authored by Jacob Vosmaer
2 parents 810f5db6 44f5e184

Merge branch 'master' of gitlab.com:gitlab-org/omnibus-gitlab

Conflicts:
	CHANGELOG
CHANGELOG
... ... @@ -21,6 +21,7 @@ omnibus-gitlab repository.
21 21 - Change default Runit log rotation from 10x1MB to 30x24h
22 22 - Security: Restrict redis and postgresql log directory permissions to 0700
23 23 - Add a 'gitlab-ctl deploy-page' command
  24 +- Automatically create /etc/gitlab/gitlab.rb after the package is installed
24 25 - Security: Use sockets and peer authentication for Postgres
25 26  
26 27 6.9.4-ee.omnibus.1
... ...
README.md
... ... @@ -159,22 +159,12 @@ Note that you cannot use a Unicorn reload to update the Ruby runtime.
159 159  
160 160 ## Configuration
161 161  
162   -### Creating the gitlab.rb configuration file
163   -
164   -```shell
165   -sudo mkdir -p /etc/gitlab
166   -sudo touch /etc/gitlab/gitlab.rb
167   -sudo chmod 600 /etc/gitlab/gitlab.rb
168   -```
169   -
170   -Below several examples are given for settings in `/etc/gitlab/gitlab.rb`.
171   -Please restart each time you made a change.
172   -
173 162 ### Configuring the external URL for GitLab
174 163  
175 164 In order for GitLab to display correct repository clone links to your users
176 165 it needs to know the URL under which it is reached by your users, e.g.
177   -`http://gitlab.example.com`. Add the following line to `/etc/gitlab/gitlab.rb`:
  166 +`http://gitlab.example.com`. Add or edit the following line in
  167 +`/etc/gitlab/gitlab.rb`:
178 168  
179 169 ```ruby
180 170 external_url "http://gitlab.example.com"
... ...
package-scripts/gitlab/postinst
... ... @@ -17,6 +17,16 @@ do
17 17 ln -sf /opt/gitlab/bin/$command /usr/bin || error_exit "Could not symlink $command in /usr/bin"
18 18 done
19 19  
  20 +# Create a minimal gitlab.rb template if /etc/gitlab/gitlab.rb does not exist.
  21 +if ! [ -e /etc/gitlab/gitlab.rb ] ; then
  22 + mkdir -p /etc/gitlab
  23 + cat > /etc/gitlab/gitlab.rb <<'EOF'
  24 +# Change the external_url to the address your users will type in their browser
  25 +external_url 'http://gitlab.example.com'
  26 +EOF
  27 + chmod 600 /etc/gitlab/gitlab.rb
  28 +fi
  29 +
20 30 echo "Thank you for installing GitLab!"
21 31 echo "You can configure GitLab for your system by running the following command:"
22 32 echo
... ...