database.yml 1.2 KB

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