Skip to content
Snippets Groups Projects
Commit 97fb12b4 authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch 'fix-database-yml-in-ce' into 'master'

Remove Geo entries from database.yml for CE builds

Closes #6840

See merge request gitlab-org/omnibus-gitlab!6111
parents 78d3ffb1 c999db9e
No related branches found
No related tags found
2 merge requests!76heptapod#711: 0.34 is the new stable,!73Sync up to upstream Omnibus GitLab 15.1
......@@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'yaml'
require "#{Omnibus::Config.project_root}/lib/gitlab/version"
require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
......@@ -135,6 +136,5 @@
# In order to compile the assets, we need to get to a state where rake can
# load the Rails environment.
copy 'config/gitlab.yml.example', 'config/gitlab.yml'
copy 'config/database.yml.postgresql', 'config/database.yml'
copy 'config/secrets.yml.example', 'config/secrets.yml'
......@@ -139,5 +139,12 @@
copy 'config/secrets.yml.example', 'config/secrets.yml'
block 'render database.yml' do
database_yml = YAML.safe_load(File.read("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml.postgresql"))
database_yml.each { |_, databases| databases.delete('geo') unless EE }
File.write("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml", YAML.dump(database_yml))
end
# Copy asset cache and node modules from cache location to source directory
move "#{Omnibus::Config.project_root}/assets_cache", "#{Omnibus::Config.source_dir}/gitlab-rails/tmp/cache"
move "#{Omnibus::Config.project_root}/node_modules", "#{Omnibus::Config.source_dir}/gitlab-rails"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment