Spring Docker Compose Module - Connecting to the Container Database

preview_player
Показать описание
In this tutorial you will learn how to connect to the database that is running inside of the container when using the Spring Boot Docker Compose Module. This will be helpful if you want to use your database tools to connect to the running database.

🔗Resources & Links mentioned in this video:

👋🏻Connect with me:

Рекомендации по теме
Комментарии
Автор

Brilliant stuff. Loving the Java 21 String Templates as well. Thanks for this tip! Awesome stuff indeed.

toobprojects
Автор

Wow! That must have been a frustrating learning experience. Thanks for saving us the grief.

WaldoRochow
Автор

Thanks a lot. Nice info. So does this mean: "when server is restarts containers will automatic restart"? It'll be wonderful if you give real working server example with docker-compose file.

odilhonislomov
Автор

I would love to see you make a video on configuring a reactive CRUD application using Java 21, HashiCorp Vault, Liquibase, and R2DBC, all services configured and running inside a docker compose.

elliothuntington
Автор

I was doing it just blindly 5432:5432, now i know the reason

praveens
Автор

that was grate, didnt know sprint has docker support, i would try it on my next projeet!

gasparcalix
Автор

Adding the ":5432" part to the ports section in my docker-compose file actually breaks my app...

xCaleb
Автор

Ah, that's the issue. `docker container ls` will show you what port on the host is mapped to the port in the container.

avalagum
Автор

thanks Dan. it is curious that Gradle still doesn't support all features of JAva 21 so maven is best option for experiments

kensaitakeso
Автор

Shouldn't the database be 'spring-blog' at 4:45?

lukasleuenberger
Автор

is there any way we can use this for testing as well, because I think the spring boot team had disabled it for testing

ylioo
Автор

In my Docker Compose for Postgress that I'm using for Keycloak to secure my Microservices, I have this:
ports:
- "5432:5432"

idouxda
Автор

Thanks sir. Don't use dark mode in youtube, please!

agusp