You moved the database check from startup to run.sh. There, you are checking for the variable DB_HOST - if this variable is empty you are defaulting to "nextcloud-db" - the default db name is not used in every installation.
Either you have to change your readme or get the host variable for the run.sh from the config.php file. Reason is, you wrote to delete those environment variables after initial setup in your readme - so normally this environment variable is not set anymore in the compose file and uses the default value.