From 035c2cc28ffdd739a4e7915b4061777181e7a71c Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sat, 7 Apr 2018 00:20:28 -0500 Subject: [PATCH] server: Add config for the database --- server/conf/application.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/server/conf/application.conf b/server/conf/application.conf index eb03550..16383ec 100644 --- a/server/conf/application.conf +++ b/server/conf/application.conf @@ -35,6 +35,31 @@ play.modules.enabled += "com.xsn.explorer.modules.ConfigModule" play.modules.enabled += "com.xsn.explorer.modules.ExecutorsModule" play.modules.enabled += "com.xsn.explorer.modules.XSNServiceModule" + +db.default { + driver = "org.postgresql.Driver" + host = "localhost:5432" + database = "xsn_blockchain" + username = "postgres" + password = "" + + host = ${?XSN_PSQL_HOST} + database = ${?XSN_PSQL_DATABASE} + username = ${?XSN_PSQL_USERNAME} + password = ${?XSN_PSQL_PASSWORD} + + url = "jdbc:postgresql://"${db.default.host}"/"${db.default.database} +} + +play.evolutions { + autoApply = true + + db.default { + enabled = true + autocommit = false + } +} + externalService.dispatcher { executor = "thread-pool-executor" throughput = 1