Skip to content

Commit c2ae036

Browse files
Revert "Remove config file."
This reverts commit 5912c04.
1 parent b38e246 commit c2ae036

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

app/config.yml.erb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
:base_path: <%= "#{ENV['GEMSTASH_HOME']}/data" %>
2+
:cache_type: memory
3+
:rubygems_url: https://rubygems.org
4+
:puma_threads: <%= (ENV['GEMSTASH_PUMA_THREADS'] || 16).to_i %>
5+
:bind: tcp://0.0.0.0:9292
6+
:protected_fetch: <%= ENV['GEMSTASH_PROTECTED_FETCH'] == 'true' ? 'true' : 'false' %>
7+
:fetch_timeout: 20
8+
:log_file: :stdout
9+
10+
<% if ENV['GEMSTASH_DB_ADAPTER'] == 'mysql2' %>
11+
# mysql2 adapter
12+
:db_adapter: mysql2
13+
:db_url: <%= "mysql2://#{ENV['GEMSTASH_DB_HOST']}:#{ENV['GEMSTASH_DB_PORT']}/#{ENV['GEMSTASH_DB_DATABASE']}" %>
14+
:db_connection_options:
15+
:adapter: 'mysql2'
16+
:user: <%= ENV['GEMSTASH_DB_USERNAME'] %>
17+
:password: <%= ENV['GEMSTASH_DB_PASSWORD'] %>
18+
<% elsif ENV['GEMSTASH_DB_ADAPTER'] == 'postgres' %>
19+
# postgres adapter
20+
:db_adapter: postgres
21+
:db_url: <%= "postgres://#{ENV['GEMSTASH_DB_HOST']}:#{ENV['GEMSTASH_DB_PORT']}/#{ENV['GEMSTASH_DB_DATABASE']}" %>
22+
:db_connection_options:
23+
:adapter: 'postgres'
24+
:user: <%= ENV['GEMSTASH_DB_USERNAME'] %>
25+
:password: <%= ENV['GEMSTASH_DB_PASSWORD'] %>
26+
:connect_timeout: 10
27+
:read_timeout: 5
28+
:timeout: 30
29+
<% else %>
30+
# sqlite adapter (default)
31+
:db_adapter: sqlite3
32+
:db_url: sqlite://gemstash.db
33+
<% end %>

0 commit comments

Comments
 (0)