gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: fetch DB connections string from Env (


From: gnunet
Subject: [libeufin] branch master updated: fetch DB connections string from Env (Sandbox)
Date: Tue, 26 Jan 2021 15:24:53 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 64f7a01  fetch DB connections string from Env (Sandbox)
64f7a01 is described below

commit 64f7a01eec0d5250edbc7e95ba65916008936bd4
Author: MS <ms@taler.net>
AuthorDate: Tue Jan 26 15:24:42 2021 +0100

    fetch DB connections string from Env (Sandbox)
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 4941d81..b0406aa 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -82,7 +82,8 @@ import tech.libeufin.util.ebics_h004.EbicsTypes
 import java.util.*
 import kotlin.random.Random
 
-const val DEFAULT_DB_CONNECTION = "jdbc:sqlite:/tmp/libeufin-sandbox.sqlite3"
+val LIBEUFIN_SANDBOX_DB_CONNECTION = System.getenv(
+    "LIBEUFIN_SANDBOX_DB_CONNECTION") ?: 
"jdbc:sqlite:/tmp/libeufin-sandbox.sqlite3"
 
 class CustomerNotFound(id: String?) : Exception("Customer ${id} not found")
 class BadInputData(inputData: String?) : Exception("Customer provided invalid 
input data: ${inputData}")
@@ -103,7 +104,7 @@ class ResetTables : CliktCommand("Drop all the tables from 
the database") {
         }
     }
 
-    private val dbConnString by option().default(DEFAULT_DB_CONNECTION)
+    private val dbConnString by 
option().default(LIBEUFIN_SANDBOX_DB_CONNECTION)
     override fun run() {
         execThrowableOrTerminate {
             dbDropTables(dbConnString)
@@ -119,7 +120,7 @@ class Serve : CliktCommand("Run sandbox HTTP server") {
         }
     }
 
-    private val dbConnString by option().default(DEFAULT_DB_CONNECTION)
+    private val dbConnString by 
option().default(LIBEUFIN_SANDBOX_DB_CONNECTION)
     private val logLevel by option()
     private val port by option().int().default(5000)
     override fun run() {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]