From 42c576da7bf4e23d8b4972096545bd4a378f6e76 Mon Sep 17 00:00:00 2001 From: John Melati Date: Tue, 9 Jul 2024 15:48:00 +0200 Subject: [PATCH] fix: temporarily hardcode db credentials --- .env | 4 ++++ docker/docker-compose.yaml => docker-compose.yaml | 2 +- .../src/main/resources/application.properties | 9 ++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .env rename docker/docker-compose.yaml => docker-compose.yaml (89%) diff --git a/.env b/.env new file mode 100644 index 00000000..34ab61a8 --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +DATASOURCE_URL=jdbc:postgresql://localhost:5432/openid-federation-db +DATASOURCE_USER=openid-federation-db-user +DATASOURCE_PASSWORD=openid-federation-db-password +DATASOURCE_DB=openid-federation-db \ No newline at end of file diff --git a/docker/docker-compose.yaml b/docker-compose.yaml similarity index 89% rename from docker/docker-compose.yaml rename to docker-compose.yaml index 92efe779..af8db708 100644 --- a/docker/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,7 @@ version: '3.9' services: db: image: postgres:latest - container_name: postgres_db + container_name: openid-federation-datastore environment: POSTGRES_USER: ${DATASOURCE_USER} POSTGRES_PASSWORD: ${DATASOURCE_PASSWORD} diff --git a/modules/admin-server/src/main/resources/application.properties b/modules/admin-server/src/main/resources/application.properties index c87c6311..328b1394 100644 --- a/modules/admin-server/src/main/resources/application.properties +++ b/modules/admin-server/src/main/resources/application.properties @@ -1,8 +1,11 @@ spring.application.name=OpenID Federation -spring.datasource.url=${DATASOURCE_URL} -spring.datasource.username=${DATASOURCE_USER} -spring.datasource.password=${DATASOURCE_PASSWORD} +spring.datasource.url=jdbc:postgresql://localhost:5432/openid-federation-db +#spring.datasource.username=openid-federation-db-user +#spring.datasource.url=${SPRING_DATASOURCE_URL} +spring.datasource.username=openid-federation-db-user + +spring.datasource.password=openid-federation-db-password spring.datasource.driver-class-name=org.postgresql.Driver # Mapping /actuator/health to /status