[tor-commits] [exonerator/master] Make database credentials command line configurable.

karsten at torproject.org karsten at torproject.org
Tue Nov 14 20:28:23 UTC 2017


commit 66cdd7eaefd99c737922205d78433c26c9c08697
Author: iwakeh <iwakeh at torproject.org>
Date:   Thu Nov 2 12:48:01 2017 +0000

    Make database credentials command line configurable.
    
    The system properties to set are 'exonerator.db.user' and 'exonerator.db.pw',
    e.g., '-Dexonerator.db.user=dummyuser -Dexonerator.db.pw=dummypassword'.
---
 src/main/resources/jetty.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/jetty.xml b/src/main/resources/jetty.xml
index ba15c61..3870fa7 100644
--- a/src/main/resources/jetty.xml
+++ b/src/main/resources/jetty.xml
@@ -28,8 +28,12 @@
       <Arg>jdbc/exonerator</Arg>
       <Arg>
         <New class="org.postgresql.ds.PGPoolingDataSource">
-          <Set name="user">dummydatabaseuser</Set>
-          <Set name="password">dummypassword</Set>
+          <Set name="user">
+            <SystemProperty name="exonerator.db.user" />
+          </Set>
+          <Set name="password">
+            <SystemProperty name="exonerator.db.pw" />
+          </Set>
           <Set name="databaseName">exonerator</Set>
           <Set name="serverName">localhost</Set>
           <Set name="dataSourceName">exonerator</Set>





More information about the tor-commits mailing list