Add dbname to deployment

This commit is contained in:
Michel ten Voorde
2024-11-05 14:31:22 +01:00
parent 65279a2947
commit b3a6ed196b
3 changed files with 12 additions and 2 deletions

View File

@@ -36,3 +36,8 @@ spec:
secretKeyRef: secretKeyRef:
key: password key: password
name: pg-pguser-swiss-test-user name: pg-pguser-swiss-test-user
- name: DB_NAME
valueFrom:
secretKeyRef:
key: dbname
name: pg-pguser-swiss-test-user

View File

@@ -36,3 +36,8 @@ spec:
secretKeyRef: secretKeyRef:
key: password key: password
name: pg-pguser-swiss-user name: pg-pguser-swiss-user
- name: DB_NAME
valueFrom:
secretKeyRef:
key: dbname
name: pg-pguser-swiss-user

View File

@@ -6,14 +6,14 @@ spring:
# - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration # - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
# - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration # - org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
datasource: 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} username: ${DB_USERNAME:postgres}
password: ${DB_PASSWORD:postgres} password: ${DB_PASSWORD:postgres}
jpa: jpa:
hibernate: hibernate:
ddl-auto: none ddl-auto: none
flyway: 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} user: ${DB_USERNAME:postgres}
password: ${DB_PASSWORD:postgres} password: ${DB_PASSWORD:postgres}
baseline-on-migrate: true baseline-on-migrate: true