I think you have to look into the core Magento unit test code how they use and get base URL.
I am not sure about this is what I shared is exactly you want, but I think it will help you.
Look into the Magento core test module.
Find the function public function testGetBaseUrl() inside this ...
I think before calling getBaseUrl() you need to set your current store then you can get correct URL.
Where $storeId is your store Id which you want the base URL.
I know maybe this isn't the answer you are expected but I have a different docker compose file for each project. Once I've finished working on one project I docker-compose down -v project, switch to my working copy in my other project and docker-compose up -d
Each project has it's own set of containers which build up a lamp stack. So own db container. But ...
For question number 1:
— You can go to docker-compose file and look for apache service then change port to something like 8085:80 then your project baseURL would be like 127.0.0.1:8085 or http://localhost:8085/
For question number 2:
— I believe, 1 docker file for 1 project only. Otherwise, you need to create another docker file for another project.
See table (core_config_data) in your database.
Search below paths under path column:
(web/unsecure/base_url) and set Url without https.
(web/secure/base_url) and set Url with https.
After that your website will work fine.
all you need is to create your store/website in magento, define base url.
add DNS record and point to your ip address.
in nginx or htaccess write store code assigned to your new shop view:
Please check all below steps:
First off all see that the database is exported to the new server.
Then transfer the magento root files to the new server.
In the root folder, change to the new database. You can do this by
going to app/etc/env.php and changing the DB array information.
change the host, dbname, username and password to the new one.
Then you ...
My lib/web folder was empty, I got them from by Backup.
When I searched for locate _email-extend.less I found the mission files.
I did penetration testing, I got some duplicate theme files in my pub/static/theme, On deleting them something wrong happened. Still dont know how this files generated.
Finally to recover I did the steps again.
rm -rf var/di/* ...