That easy, you are already mapping dockerdir as source in duplicati, meaning that you can select nextcloud and mariadb config dir for source of your backups. you dont need anything else.
Just make sure that ${DOCKERSDIR} is same for duplicati and nextcloud+mariadb
In /source/mariadb and /source/nextcloud you already have what you need to make the backup
And the guide -
Create new backup in duplicati
Select backup destination - /backups
Select backup source - checkmarks on My Computer/source/nextcloud/appdata and My Computer/source/mariadb
Config time schedule
Config file size and other…
Done