summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriwakeh <iwakeh@torproject.org>2017-11-02 12:48:01 +0000
committeriwakeh <iwakeh@torproject.org>2017-11-02 12:48:01 +0000
commit66cdd7eaefd99c737922205d78433c26c9c08697 (patch)
tree438f0b4efc01887c6caa082db583384da2af6ff5
parent7817a7cc2a88671882fafabff162f262adc650fa (diff)
Make database credentials command line configurable.task-24174
The system properties to set are 'exonerator.db.user' and 'exonerator.db.pw', e.g., '-Dexonerator.db.user=dummyuser -Dexonerator.db.pw=dummypassword'.
-rw-r--r--src/main/resources/jetty.xml8
1 files 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>