58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
|
|
myapp = {
|
|
database = {
|
|
driver = org.postgresql.Driver
|
|
# url = "jdbc:postgresql://localhost:5432/test_db"
|
|
dbHost = localhost
|
|
dbHost = ${?APP_DB_HOST}
|
|
dbPort = 5432
|
|
dbPort = ${?APP_DB_PORT}
|
|
dbName = test_db
|
|
dbName = ${?APP_DB_NAME}
|
|
url = "jdbc:postgresql://"${myapp.database.dbHost}":"${myapp.database.dbPort}"/"${myapp.database.dbName}
|
|
user = "test_user"
|
|
password = "password"
|
|
|
|
// The number of threads determines how many things you can *run* in parallel
|
|
// the number of connections determines you many things you can *keep in memory* at the same time
|
|
// on the database server.
|
|
// numThreads = (core_count (hyperthreading included))
|
|
numThreads = 16
|
|
|
|
// queueSize = ((core_count * 2) + effective_spindle_count)
|
|
// on a MBP 13, this is 2 cores * 2 (hyperthreading not included) + 1 hard disk
|
|
queueSize = 1000
|
|
|
|
// https://blog.knoldus.com/2016/01/01/best-practices-for-using-slick-on-production/
|
|
// make larger than numThreads + queueSize
|
|
maxConnections = 16
|
|
|
|
connectionTimeout = 5000
|
|
validationTimeout = 5000
|
|
|
|
# connectionPool = disabled
|
|
keepAlive = true
|
|
|
|
migrations-table = "flyway_schema_history"
|
|
|
|
migrations-locations = [
|
|
# "classpath:example/jdbc"
|
|
"classpath:db/migration/default"
|
|
]
|
|
},
|
|
testDatabase = {
|
|
driver = org.postgresql.Driver
|
|
user = "scala"
|
|
password = "scala"
|
|
|
|
numThreads = 16
|
|
|
|
queueSize = 10
|
|
|
|
maxConnections = 36
|
|
|
|
}
|
|
}
|
|
|
|
|