Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit 3bd1c7f

Browse files
author
kahverengi
committed
Test heroku environment variables
1 parent 5ae0aa9 commit 3bd1c7f

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: generic
22

33
script:
44
- if [ "$TRAVIS_BRANCH" = "dev" ]; then ./gradlew buildDev; fi
5-
- if [ "$TRAVIS_BRANCH" = "master" ]; then ./gradlew Build; fi
65
install:
76
- nvm use 11.0.0
87
- npm --version

src/main/kotlin/com/parnote/config/ConfigManager.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,27 @@ class ConfigManager(mLogger: Logger, mVertx: Vertx) {
4141
mapOf(
4242
"config-version" to CONFIG_VERSION,
4343

44-
"recaptcha-secret" to "",
44+
"recaptcha-secret" to System.getProperty("recaptchaSecret", ""),
4545

4646
"database" to mapOf(
47-
"host" to "",
48-
"name" to "",
49-
"username" to "",
50-
"password" to "",
51-
"prefix" to "parnote_"
47+
"host" to System.getProperty("dbHost", ""),
48+
"name" to System.getProperty("dbName", ""),
49+
"username" to System.getProperty("dbUsername", ""),
50+
"password" to System.getProperty("dbPassword", ""),
51+
"prefix" to System.getProperty("dbPrefix", "parnote_")
5252
),
5353

5454
"email" to mapOf(
55-
"address" to "",
56-
"host" to "",
57-
"port" to 465,
58-
"username" to "",
59-
"password" to "",
60-
"SSL" to true
55+
"address" to System.getProperty("emailAddress", ""),
56+
"host" to System.getProperty("emailHost", ""),
57+
"port" to Integer.getInteger("emailPort", 465),
58+
"username" to System.getProperty("emailUsername", ""),
59+
"password" to System.getProperty("emailPassword", ""),
60+
"SSL" to (System.getProperty("emailSSL", "1") == "1")
6161
),
6262

6363
"resourcesDir" to "src/main/resources/",
64-
"ui-address" to "http://localhost:5000"
64+
"ui-address" to System.getProperty("uiAddress", "http://localhost:5000")
6565
)
6666
)
6767
}

0 commit comments

Comments
 (0)