PostgreSQL
 SQL >> Database >  >> RDS >> PostgreSQL

Collegare Spring Boot a Postgres con Docker Compose

Ogni container ha il proprio localhost: non usare localhost per raggiungere Postgres.

spring.datasource.url=jdbc:postgresql://db:5432/sample

Compose risolve db con il nome del servizio. Puoi anche sostituire image: con build: ..