Containerisiert.
Code: Select all
version: '3'
services:
postgres:
image: postgres:14.2
container_name: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
volumes:
- ./src/main/resources/initial_data_generation.sql:/docker-entrypoint-initdb.d/init.sql
>
Code: Select all
## Database connection
spring.datasource.url=jdbc:postgresql://${DATABASE_HOST:localhost}:${DATABASE_PORT:5432}/${DATABASE_NAME:library-system-db}
spring.datasource.username=${DATABASE_USERNAME:postgres}
spring.datasource.password=${DATABASE_PASSWORD:password}
# JPA Properties
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect
Code: Select all
FATAL: database "library-system-db" does not exist
Sie finden weitere Details in der beigefügten Protokolldatei. Das Protokoll legt auch nahe, dass sich möglicherweise einige andere Fehler aus diesem root -Problem ergeben. Lassen Sie mich wissen, ob Sie zusätzliche Informationen benötigen!