Ogni container ha il proprio localhost: non usare localhost per raggiungere Postgres.
spring.datasource.url=jdbc:postgresql://db:5432/sampleCompose risolve db con il nome del servizio. Puoi anche sostituire image: con build: ..
Ogni container ha il proprio localhost: non usare localhost per raggiungere Postgres.
spring.datasource.url=jdbc:postgresql://db:5432/sampleCompose risolve db con il nome del servizio. Puoi anche sostituire image: con build: ..