I believe the BASEROW_PUBLIC_URL is for the situations when you want to expose your Baserow outside of your LAN. In your case, I think it’s not needed at all, and could be removed completely from the compose file.
The BASEROW_PUBLIC_URL environment variable holds the URL how you’re accessing Baserow. It needs to contain the URL that you would visit in your browser if you would open Baserow. If your Baserow environment is supposed to run on http://localhost, then that should be the value of it. This is because we have an application builder that can publish applications to a domain, so Baserow needs to know on which one to run the Baserow tool on.