Use ERPNext with non-containerized database in docker-compose

I downloaded the latest repository from github, and then copied example.env to .env
I changed DB_PASSWORD, DB_PORT, DB_HOST in .env file.

And then ran docker-compose -f ./pwd.yml up.

It runs up but still uses mariadb container and not my remote database.

Can someone help on it?