change config strings
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-04-06 01:17:15 +02:00
parent 5758721ab9
commit a43b692acf
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
3 changed files with 11 additions and 8 deletions

View File

@ -25,8 +25,11 @@ services:
POSTGRES_DB: "output-service-rdb" POSTGRES_DB: "output-service-rdb"
DB_URL: "jdbc:postgresql://output-service-postgres:5432/output-service-rdb" DB_URL: "jdbc:postgresql://output-service-postgres:5432/output-service-rdb"
MQ_HOST: rabbitmq MQ_HOST: rabbitmq
MQ_USERNAME: rabbitmq MQ_USERNMAE: rabbitmq
MQ_PASSWORD: rabbitmq MQ_PASSWORD: rabbitmq
depends_on:
- rabbitmq
- output-service-postgres
rabbitmq: rabbitmq:
image: "rabbitmq:3-management" image: "rabbitmq:3-management"

View File

@ -7,13 +7,13 @@ ktor {
modules = [ com.kmalbz.ApplicationKt.module ] modules = [ com.kmalbz.ApplicationKt.module ]
} }
db { db {
jdbcUrl = ${DB_URL} //jdbc:postgresql://localhost:${db_port}/${db_name} jdbc = ${DB_URL}
dbUser = ${DB_USER} user = ${DB_USER}
dbPassword = ${DB_PASSWORD} password = ${DB_PASSWORD}
} }
mq{ mq{
host = ${MQ_HOST} host = ${MQ_HOST}
username = ${MQ_USERNMAE} username = ${MQ_USERNAME}
password = ${MQ_PASSWORD} password = ${MQ_PASSWORD}
} }
} }

View File

@ -14,11 +14,11 @@ object DatabaseFactory {
@KtorExperimentalAPI @KtorExperimentalAPI
private val appConfig = HoconApplicationConfig(ConfigFactory.load()) private val appConfig = HoconApplicationConfig(ConfigFactory.load())
@KtorExperimentalAPI @KtorExperimentalAPI
private val dbUrl = appConfig.property("db.jdbcUrl").getString() private val dbUrl = appConfig.property("db.jdbc").getString()
@KtorExperimentalAPI @KtorExperimentalAPI
private val dbUser = appConfig.property("db.dbUser").getString() private val dbUser = appConfig.property("db.user").getString()
@KtorExperimentalAPI @KtorExperimentalAPI
private val dbPassword = appConfig.property("db.dbPassword").getString() private val dbPassword = appConfig.property("db.password").getString()
@KtorExperimentalAPI @KtorExperimentalAPI
fun init() { fun init() {