database.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. default: &default
  2. adapter: postgresql
  3. pool: <%= ENV["DB_POOL"] || ENV['MAX_THREADS'] || 5 %>
  4. timeout: 5000
  5. connect_timeout: 15
  6. encoding: unicode
  7. sslmode: <%= ENV['DB_SSLMODE'] || "prefer" %>
  8. application_name: ''
  9. development:
  10. <<: *default
  11. database: <%= ENV['DB_NAME'] || 'mastodon_development' %>
  12. username: <%= ENV['DB_USER'] %>
  13. password: <%= (ENV['DB_PASS'] || '').to_json %>
  14. host: <%= ENV['DB_HOST'] %>
  15. port: <%= ENV['DB_PORT'] %>
  16. # Warning: The database defined as "test" will be erased and
  17. # re-generated from your development database when you run "rake".
  18. # Do not set this db to the same as development or production.
  19. test:
  20. <<: *default
  21. database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %>
  22. username: <%= ENV['DB_USER'] %>
  23. password: <%= (ENV['DB_PASS'] || '').to_json %>
  24. host: <%= ENV['DB_HOST'] %>
  25. port: <%= ENV['DB_PORT'] %>
  26. production:
  27. <<: *default
  28. database: <%= ENV['DB_NAME'] || 'mastodon_production' %>
  29. username: <%= ENV['DB_USER'] || 'mastodon' %>
  30. password: <%= (ENV['DB_PASS'] || '').to_json %>
  31. host: <%= ENV['DB_HOST'] || 'localhost' %>
  32. port: <%= ENV['DB_PORT'] || 5432 %>
  33. prepared_statements: <%= ENV['PREPARED_STATEMENTS'] || 'true' %>