diff --git a/env/local.env b/env/local.env index 27888cd62..7d2c958b7 100644 --- a/env/local.env +++ b/env/local.env @@ -27,7 +27,8 @@ export OIDC_AUTHORITY_ENDPOINT="https://terradevb2c.b2clogin.com/terradevb2c.onm export OPENCENSUS_SAMPLING_PROBABILITY=0 export OPENCENSUS_STACKDRIVER_ENABLED="false" export POSTGRES_PASSWORD="sam-test" -export POSTGRES_URL="jdbc:postgresql://localhost:5432/testdb" +export POSTGRES_READ_URL="jdbc:postgresql://localhost:5432/testdb" +export POSTGRES_WRITE_URL="jdbc:postgresql://localhost:5432/testdb" export POSTGRES_USERNAME="sam-test" export SAM_PEM_PATH="src/main/resources/rendered/sam-account.pem" export SAM_SA_PATH="src/main/resources/rendered/sam-account.json" diff --git a/env/test.env b/env/test.env index 5c2e363ac..771684daf 100644 --- a/env/test.env +++ b/env/test.env @@ -22,7 +22,8 @@ export OIDC_AUTHORITY_ENDPOINT="https://terradevb2c.b2clogin.com/terradevb2c.onm export OPENCENSUS_SAMPLING_PROBABILITY=0 export OPENCENSUS_STACKDRIVER_ENABLED="false" export POSTGRES_PASSWORD="sam-test" -export POSTGRES_URL="jdbc:postgresql://localhost:5432/testdb" +export POSTGRES_READ_URL="jdbc:postgresql://localhost:5432/testdb" +export POSTGRES_WRITE_URL="jdbc:postgresql://localhost:5432/testdb" export POSTGRES_USERNAME="sam-test" export SAM_PEM_PATH="src/main/resources/rendered/sam-account.pem" export SAM_SA_PATH="src/main/resources/rendered/sam-account.json" diff --git a/src/main/resources/sam.conf b/src/main/resources/sam.conf index 08f4cb8be..7fd6b23d7 100644 --- a/src/main/resources/sam.conf +++ b/src/main/resources/sam.conf @@ -130,7 +130,7 @@ db { poolMaxSize = 8 poolConnectionTimeoutMillis = 5000 driver = "org.postgresql.Driver" - url = ${?POSTGRES_URL} + url = ${?POSTGRES_READ_URL} user = ${?POSTGRES_USERNAME} password = ${?POSTGRES_PASSWORD} } @@ -145,7 +145,7 @@ db { # Changes to this value should be reflected in liquibase.properties driver = "org.postgresql.Driver" # Changes to this value should be reflected in liquibase.properties - url = ${?POSTGRES_URL} + url = ${?POSTGRES_WRITE_URL} user = ${?POSTGRES_USERNAME} password = ${?POSTGRES_PASSWORD} } @@ -158,7 +158,7 @@ db { poolMaxSize = 5 poolConnectionTimeoutMillis = 5000 driver = "org.postgresql.Driver" - url = ${?POSTGRES_URL} + url = ${?POSTGRES_WRITE_URL} user = ${?POSTGRES_USERNAME} password = ${?POSTGRES_PASSWORD} }