|
15 | 15 | # See the License for the specific language governing permissions and
|
16 | 16 | # limitations under the License.
|
17 | 17 | #
|
18 |
| -require 'yaml' |
19 | 18 | require "#{Omnibus::Config.project_root}/lib/gitlab/version"
|
20 | 19 | require "#{Omnibus::Config.project_root}/lib/gitlab/ohai_helper.rb"
|
21 | 20 |
|
|
151 | 150 | # In order to compile the assets, we need to get to a state where rake can
|
152 | 151 | # load the Rails environment.
|
153 | 152 | copy 'config/gitlab.yml.example', 'config/gitlab.yml'
|
| 153 | + copy 'config/database.yml.postgresql', 'config/database.yml' |
154 | 154 | copy 'config/secrets.yml.example', 'config/secrets.yml'
|
155 | 155 |
|
156 |
| - block 'render database.yml' do |
157 |
| - database_yml = YAML.safe_load(File.read("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml.postgresql")) |
158 |
| - database_yml.each { |_, databases| databases.delete('geo') unless EE } |
159 |
| - |
160 |
| - File.write("#{Omnibus::Config.source_dir}/gitlab-rails/config/database.yml", YAML.dump(database_yml)) |
161 |
| - end |
162 |
| - |
163 | 156 | # Copy asset cache and node modules from cache location to source directory
|
164 | 157 | move "#{Omnibus::Config.project_root}/assets_cache", "#{Omnibus::Config.source_dir}/gitlab-rails/tmp/cache"
|
165 | 158 | move "#{Omnibus::Config.project_root}/node_modules", "#{Omnibus::Config.source_dir}/gitlab-rails"
|
|
168 | 161 | 'NODE_ENV' => 'production',
|
169 | 162 | 'RAILS_ENV' => 'production',
|
170 | 163 | 'PATH' => "#{install_dir}/embedded/bin:#{Gitlab::Util.get_env('PATH')}",
|
171 |
| - 'USE_DB' => 'false', |
172 | 164 | 'SKIP_STORAGE_VALIDATION' => 'true',
|
| 165 | + 'SKIP_DATABASE_CONFIG_VALIDATION' => 'true', |
173 | 166 | 'NODE_OPTIONS' => '--max_old_space_size=3584'
|
174 | 167 | }
|
175 | 168 | assets_compile_env['NO_SOURCEMAPS'] = 'true' if Gitlab::Util.get_env('NO_SOURCEMAPS')
|
|
0 commit comments