Skip to content

Commit 660221b

Browse files
committed
Reorganise configuration
1 parent 9e04146 commit 660221b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

app/config.yml.erb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
<% if ENV['GEMSTASH_DB_ADAPTER'] == 'mysql2' %>
1111
# mysql2 adapter
1212
:db_adapter: mysql2
13-
:db_url: {}
13+
:db_url: <%= "mysql2://#{ENV['GEMSTASH_DB_HOST']}:#{ENV['GEMSTASH_DB_PORT']}/#{ENV['GEMSTASH_DB_DATABASE']}" %>
1414
:db_connection_options:
1515
:adapter: 'mysql2'
16-
:host: <%= ENV['GEMSTASH_DB_HOST'] %>
17-
:port: <%= ENV['GEMSTASH_DB_PORT'] %>
18-
:database: <%= ENV['GEMSTASH_DB_DATABASE'] %>
1916
:user: <%= ENV['GEMSTASH_DB_USERNAME'] %>
2017
:password: <%= ENV['GEMSTASH_DB_PASSWORD'] %>
2118
:max_connections: <%= ENV['GEMSTASH_PUMA_THREADS'].to_i + 1 %>
@@ -24,6 +21,7 @@
2421
:db_adapter: postgres
2522
:db_url: <%= "postgres://#{ENV['GEMSTASH_DB_HOST']}:#{ENV['GEMSTASH_DB_PORT']}/#{ENV['GEMSTASH_DB_DATABASE']}" %>
2623
:db_connection_options:
24+
:adapter: 'postgres'
2725
:user: <%= ENV['GEMSTASH_DB_USERNAME'] %>
2826
:password: <%= ENV['GEMSTASH_DB_PASSWORD'] %>
2927
:max_connections: <%= ENV['GEMSTASH_PUMA_THREADS'].to_i + 1 %>

0 commit comments

Comments
 (0)