Just because nobody replied and i found a workaround:
Set up 2 docker-compose.yml with 1 with the db and the other just your app.
And voila!
You have the db in 1 container, and the app in another one and they can connect with each other.
Searched for answers, didn't found so tried something.