REST API can't find datasurce "attribute [datasource] is required when attribute [dbtype] is not [query] and no default datasource is defined" lucee

"attribute [datasource] is required when attribute [dbtype] is not [query] and no default datasource is defined" lucee
function onApplicationStart() {
    restInitApplication(
            dirPath=ExpandPath( "." ), 
            serviceMapping="vodovod", 
            password="changeit"
    );

    return true;
}

It can’t find my datasource which is defined as the default one, however when I move all my rest .cfc files to the root folder and redifine my rest api as follows:

function onApplicationStart() {
    restInitApplication(
            dirPath=ExpandPath( "." ), 
            serviceMapping="vodovod", 
            password="changeit"
    );

    return true;
}

I am able to query data from the datasource.
Coincidentally when I create a sub folder and put a normal cfm file in it and just query data casually it works without problem and without a need to specify a datasource. Btw i tried both specifying the datasource explicitly and not at all and neither worked. Why isn’t the rest subfolder able to detect the datasource?

I run Lucee in a docker container.

One solution that I’ve found is to create an Application.cfc in the subfolder and set the datasource there again, but is there no way to just have it be set once in the root Application.cfc?