crabgrass/config/database.yml.example

49 lines
1.0 KiB
Plaintext

<%
branch_name_as_db_name = false
if branch_name_as_db_name
branch = `git branch`.split("\n").grep(/^\*/).first.sub('*','').strip
if branch == 'master'
db_name = 'crabgrass'
else
db_name = branch
end
else
db_name = 'crabgrass'
end
%>
development:
encoding: utf8mb4
charset: utf8mb4
collation: utf8mb4_unicode_ci
adapter: mysql2
database: <%=db_name%>_development
username: root
password:
host: <%= ENV['MYSQL_HOST'] || 'localhost' %>
test:
encoding: utf8mb4
charset: utf8mb4
collation: utf8mb4_unicode_ci
adapter: mysql2
database: <%=db_name%>_test
username: root
password:
host: <%= ENV['MYSQL_HOST'] || 'localhost' %>
# our integration tests make some requests in parallel
# so webrick spins up more threads - up to 7 as far as
# i've seen. So let's give it a bit of room.
pool: 10
production:
encoding: utf8mb4
charset: utf8mb4
collation: utf8mb4_unicode_ci
adapter: mysql2
database: <%=db_name%>
username: root
password:
host: <%= ENV['MYSQL_HOST'] || 'localhost' %>