Configurando o Postgres no Spring Boot Docker Compose services: postgres-db: image: postgres:17-alpine restart: always environment: POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres MAX_CONNECTIONS: 300 volumes: - postgres_db:/var/lib/postgresql/data ports: - "5442:5432" networks: - alpha-net volumes: postgres_db: networks: alpha-net: driver: bridge Application Properties #POSTGRES spring.datasource.url=jdbc:postgresql://localhost:5432/postgres spring.datasource.username=postgres spring.datasource.password=postgres spring.datasource.driver-class-name=org.postgresql.Driver #JPA spring.jpa.hibernate.ddl-auto=update spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false spring.jpa.show-sql=true