diff --git a/k8s/deployment-test.yaml b/k8s/deployment-test.yaml index 4621c7a..df41959 100644 --- a/k8s/deployment-test.yaml +++ b/k8s/deployment-test.yaml @@ -35,4 +35,9 @@ spec: valueFrom: secretKeyRef: key: password + name: pg-pguser-swiss-test-user + - name: DB_NAME + valueFrom: + secretKeyRef: + key: dbname name: pg-pguser-swiss-test-user \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index d6200d1..229a8fc 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -35,4 +35,9 @@ spec: valueFrom: secretKeyRef: key: password + name: pg-pguser-swiss-user + - name: DB_NAME + valueFrom: + secretKeyRef: + key: dbname name: pg-pguser-swiss-user \ No newline at end of file diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 12e81ee..78de0e4 100755 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -6,14 +6,14 @@ spring: # - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration # - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration datasource: - url: jdbc:postgresql://${DB_URL:localhost:5432}/swiss?currentSchema=swiss + url: jdbc:postgresql://${DB_URL:localhost:5432}/${DB_NAME}?currentSchema=swiss username: ${DB_USERNAME:postgres} password: ${DB_PASSWORD:postgres} jpa: hibernate: ddl-auto: none flyway: - url: jdbc:postgresql://${DB_URL:localhost:5432}/swiss?currentSchema=swiss + url: jdbc:postgresql://${DB_URL:localhost:5432}/${DB_NAME}?currentSchema=swiss user: ${DB_USERNAME:postgres} password: ${DB_PASSWORD:postgres} baseline-on-migrate: true