Migrating a customized instance to a new location with local volumes

I have an instance of OpenEMR 7.0 running on docker on my server for my private practice. I have customized it with mild changes for my patients. It runs fine with almost unchanged docker-compose.yml file. I want to migrate all data to a new docker, but in an environment with bind mounts to store volume data.

I tried to specify the route to local volumes and container shows an error:

Plan to try an upgrade from 0 to 5
PHP Warning: require_once(/var/www/localhost/htdocs/openemr/sites/default/sqlconf.php): Failed to open stream: No such file or directory in Command line code on line 1
PHP Fatal error: Uncaught Error: Failed opening required ‘/var/www/localhost/htdocs/openemr/sites/default/sqlconf.php’ (include_path=’.:/usr/share/php82’) in Command line code:1
Stack trace:

thrown in Command line code on line 1

How would be the best approach? how can I set the bind mounts in .yaml file?

Thanks in advance!