Create minimal /etc/gitlab/gitlab.rb template in package postinst script
We have a postinst
script that gets run automatically after the package is installed. We could add something like this to it:
if ! [ -f /etc/gitlab/gitlab.rb ] ; then
mkdir /etc/gitlab
cat > /etc/gitlab/gitlab.rb <<'EOF'
# Change the external_url to the address your users will type in their browser
external_url 'http://gitlab.example.com'
EOF
chmod 600 /etc/gitlab/gitlab.rb
fi
Then the installation steps would become:
- download package
- install package
- edit /etc/gitlab/gitlab.rb (which exists thanks to postinst)
- run gitlab-ctl reconfigure
I do not know how many people need to edit external_url, but it is probably the most common setting.