Commit 2403682a authored by Marin Jankovski's avatar Marin Jankovski

Add option to supply admin root password.

parent f13e0799
......@@ -121,6 +121,9 @@ default['gitlab']['default_projects_features']['visibility_level'] = "private"
default['gitlab']['webhook_timeout'] = 10
# Default admin user password
default['gitlab']['admin_root_password'] = nil
# Gems
default['gitlab']['bundle_install'] = "SSL_CERT_FILE=/opt/local/etc/certs/cacert.pem bundle install --path=.bundle --deployment"
......
......@@ -144,11 +144,12 @@ end
execute "rake db:schema:load" do
command <<-EOS
PATH="/usr/local/bin:$PATH"
bundle exec rake db:schema:load RAILS_ENV=#{gitlab['env']}
bundle exec rake db:schema:load
EOS
cwd gitlab['path']
user gitlab['user']
group gitlab['group']
environment ({'RAILS_ENV' => gitlab['env']})
action :nothing
subscribes :run, "mysql_database[gitlabhq_database]"
subscribes :run, "postgresql_database[gitlabhq_database]"
......@@ -158,11 +159,12 @@ end
execute "rake db:migrate" do
command <<-EOS
PATH="/usr/local/bin:$PATH"
bundle exec rake db:migrate RAILS_ENV=#{gitlab['env']}
bundle exec rake db:migrate
EOS
cwd gitlab['path']
user gitlab['user']
group gitlab['group']
environment ({'RAILS_ENV' => gitlab['env']})
action :nothing
subscribes :run, "git[clone gitlabhq source]"
subscribes :run, "execute[rake db:schema:load]"
......@@ -172,11 +174,12 @@ end
execute "rake db:seed_fu" do
command <<-EOS
PATH="/usr/local/bin:$PATH"
bundle exec rake db:seed_fu RAILS_ENV=#{gitlab['env']}
bundle exec rake db:seed_fu
EOS
cwd gitlab['path']
user gitlab['user']
group gitlab['group']
environment ({'RAILS_ENV' => gitlab['env'], 'GITLAB_ROOT_PASSWORD' => gitlab['admin_root_password'] })
action :nothing
subscribes :run, "execute[rake db:schema:load]"
end
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment