Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Replace packager database.yml with it

Oliver Günther69747f21df75
diff --git a/packaging/conf/database.yml b/packaging/conf/database.yml
deleted file mode 100644
index a5a26d84ffe..00000000000
--- a/packaging/conf/database.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-<% url = ENV.fetch('DATABASE_URL') %>
-production:
- url: <%= url %>
- <% if encoding = ENV['DATABASE_ENCODING'] %>
- encoding: '<%= encoding %>'
- <% end %>
- <% if url.start_with? 'mysql' %>
- reconnect: true
- variables:
- # These are the default MySql Modes for rails 5.0 only excluding
- # ONLY_FULL_GROUP_BY which would interfere with the current implementation
- # of the query grouping by custom fields.
- sql_mode: "no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,error_for_division_by_zero,no_engine_substitution"
- <% end %>
diff --git a/packaging/setup b/packaging/setup
index be83296ce35..b4a1de34b33 100755
--- a/packaging/setup
+++ b/packaging/setup
@@ -4,7 +4,7 @@
date -u +"%Y-%m-%dT%H:%M:%SZ" > RELEASE_DATE
# Copy default database.yml
-cp -f packaging/conf/database.yml config/database.yml
+cp -f config/database.production.yml config/database.yml
cp -f packaging/conf/configuration.yml config/configuration.yml
sed -i "s|config.public_file_server.enabled = false|config.public_file_server.enabled = true|" config/environments/production.rb