nextCloud Implementation

Hi All,
Docker newbie here. I have docker running on my headless Linux (Debian 10). I will have an external drive attached to house the actual files served by nextCloud. I have tried to read everything I can on setting this up, but I get confused on what is application data and what are the files being served. Also, where these are supposed to be stored? Surely everything doesn’t go to `/var/www/html/data’. That would kinda defeat the purpose of having your own cloud file server.

Help? or point me in the right direction, please.