File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 %>
You can’t perform that action at this time.
0 commit comments