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

@@ -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

View File

@@ -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

View File

@@ -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