fix: last ditch effort with .env variables, using default variable to set db connection values
This commit is contained in:
parent
02bff19de0
commit
a6e4f80a01
@ -1,3 +1,24 @@
|
|||||||
|
# PostgreSQL configuration for the main database (backend)
|
||||||
|
# These variables are read by Spring Boot's auto-configuration
|
||||||
|
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5433/backend_db
|
||||||
|
SPRING_DATASOURCE_USERNAME=${BACKEND_USER}
|
||||||
|
SPRING_DATASOURCE_PASSWORD=${BACKEND_PASSWORD}
|
||||||
|
|
||||||
|
# You might also need to explicitly set DDL-auto and initialization mode
|
||||||
|
# if you were previously relying on application.properties for these
|
||||||
|
# SPRING_JPA_HIBERNATE_DDL_AUTO=update
|
||||||
|
# SPRING_SQL_INIT_MODE=never
|
||||||
|
|
||||||
|
|
||||||
|
# Original backend database details
|
||||||
|
# Keeping these as they might be used to set the values above,
|
||||||
|
# or potentially used elsewhere in your setup (though not explicitly seen in provided docker-compose for backend)
|
||||||
|
BACKEND_DB=backend_db
|
||||||
|
BACKEND_USER=backend_db_user
|
||||||
|
BACKEND_PASSWORD=backend_db_user_password
|
||||||
|
|
||||||
|
# PostgreSQL configuration for Keycloak's database
|
||||||
|
# These variables are used by Keycloak's Docker image setup args
|
||||||
POSTGRES_DB=postgres_db
|
POSTGRES_DB=postgres_db
|
||||||
POSTGRES_USER=postgres
|
POSTGRES_USER=postgres
|
||||||
POSTGRES_PASSWORD=postgres_db_user_password
|
POSTGRES_PASSWORD=postgres_db_user_password
|
||||||
@ -5,18 +26,19 @@ POSTGRES_PASSWORD=postgres_db_user_password
|
|||||||
KEYCLOAK_ADMIN=admin
|
KEYCLOAK_ADMIN=admin
|
||||||
KEYCLOAK_ADMIN_PASSWORD=admin
|
KEYCLOAK_ADMIN_PASSWORD=admin
|
||||||
KEYCLOAK_HOSTNAME=localhost
|
KEYCLOAK_HOSTNAME=localhost
|
||||||
|
# Note: The KEYCLOAK_DB, KEYCLOAK_USER, KEYCLOAK_PASSWORD below seem unused in the provided Keycloak Dockerfile args,
|
||||||
|
# which instead use POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD.
|
||||||
|
# Keeping them here for completeness if they are used elsewhere.
|
||||||
KEYCLOAK_DB=keycloak_db
|
KEYCLOAK_DB=keycloak_db
|
||||||
KEYCLOAK_USER=keycloak_db_user
|
KEYCLOAK_USER=keycloak_db_user
|
||||||
KEYCLOAK_PASSWORD=keycloak_db_user_password
|
KEYCLOAK_PASSWORD=keycloak_db_user_password
|
||||||
|
|
||||||
BACKEND_DB=backend_db
|
# Frontend (Vite) configuration
|
||||||
BACKEND_USER=backend_db_user
|
|
||||||
BACKEND_PASSWORD=backend_db_user_password
|
|
||||||
|
|
||||||
DATABASE_URL=localhost:5433
|
|
||||||
|
|
||||||
VITE_KEYCLOAK_URL=http://localhost:7080
|
VITE_KEYCLOAK_URL=http://localhost:7080
|
||||||
VITE_KEYCLOAK_CLIENT_ID=myinpulse
|
VITE_KEYCLOAK_CLIENT_ID=myinpulse
|
||||||
VITE_KEYCLOAK_REALM=test
|
VITE_KEYCLOAK_REALM=test
|
||||||
VITE_APP_URL=http://localhost:8080
|
VITE_APP_URL=http://localhost:8080
|
||||||
VITE_BACKEND_URL=http://localhost:8081/
|
VITE_BACKEND_URL=http://localhost:8081/
|
||||||
|
|
||||||
|
# Removed the DATABASE_URL variable as it's replaced by SPRING_DATASOURCE_URL for Spring Boot
|
||||||
|
# # DATABASE_URL=localhost:5433
|
Loading…
x
Reference in New Issue
Block a user