Skip to content
Snippets Groups Projects
Commit c7ef495d authored by Felipe D'Abrantes's avatar Felipe D'Abrantes
Browse files

Move environment variable configs to separate file

parent e554192b
No related branches found
No related tags found
1 merge request!31Implement Mongo Seeder v2
Pipeline #46279 failed with stage
in 1 hour, 18 minutes, and 21 seconds
This commit is part of merge request !31. Comments created here will be created in the context of that merge request.
......@@ -4,8 +4,10 @@ import com.typesafe.config.{Config, ConfigFactory}
object ConfigHelper {
private val applicationConfig: Config = ConfigFactory.load("application.conf")
private val referenceConfig: Config = ConfigFactory.parseResources("reference.conf")
private val config: Config = referenceConfig.withFallback(applicationConfig).resolve()
def getString(key: String): String = applicationConfig.getString(key)
def getInt(key: String): Int = applicationConfig.getInt(key)
def getBoolean(key: String): Boolean = applicationConfig.getBoolean(key)
def getString(key: String): String = config.getString(key)
def getInt(key: String): Int = config.getInt(key)
def getBoolean(key: String): Boolean = config.getBoolean(key)
}
......@@ -37,10 +37,3 @@ play.http.errorHandler = "models.CustomErrorHandler"
# Control which modules are loaded when Play starts.
play.modules.enabled += Module
# --- Configuration Values to be replaced with environment variables, if present ---
mongodb.uri = ${?MONGO_URI}
enable.question.db.seeding = ${?ENABLE_QUESTION_DB_SEEDING}
jwt.privateKey = ${?JWT_PRIVATE_KEY}
friend.service.uri = ${?FRIEND_SERVICE_URI}
user.service.uri = ${?USER_SERVICE_URI}
# --- Configuration Values to be replaced with environment variables, if present ---
# MongoDB Connection Strings
mongodb.uri = ${?MONGO_URI}
# Whether to seed the Question DB
enable.question.db.seeding = ${?ENABLE_QUESTION_DB_SEEDING}
# JWT Authentication
jwt.privateKey = ${?JWT_PRIVATE_KEY}
# External Service URIs
friend.service.uri = ${?FRIEND_SERVICE_URI}
user.service.uri = ${?USER_SERVICE_URI}
# Application Secret Key - https://www.playframework.com/documentation/2.8.x/ApplicationSecret
play.http.secret.key=${?PLAY_HTTP_SECRET_KEY}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment