Class: Support::BootstrapRails

Inherits:
Object
  • Object
show all
Defined in:
lib/support/bootstrap_rails.rb

Overview

Bootstrap GitLab rails environment

Constant Summary collapse

LOG_FILE =

The log file should be in the “support” folder, not in “suppport/lib”

'../bootstrap-rails.log'

Instance Method Summary collapse

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/support/bootstrap_rails.rb', line 14

def execute
  if config.geo.secondary?
    GDK::Output.info("Exiting as we're a Geo secondary.")
    exit
  end

  GDK::Output.abort('Cannot connect to PostgreSQL.') unless postgresql.ready?
  FileUtils.rm_f(LOG_FILE)

  bootstrap_main_db && bootstrap_ci_db && bootstrap_sec_db && bootstrap_embedding_db
end