Nextcloud Docker installation

Hi,

I’m using Nextcloud for 2 years. It’s running in a Qemu/KVM on my private server at home.
Now I try to change it to Docker.
The Example (https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm) fpm-image runs, but I try to chance a bit.
My experianc with docker isn’t very well, so maybe some of you could help.

My destination is one docker-compose.yml for starting all services on my server.
for exampel the web-page on www.example.com
the nextcloud with cloud.example.com
and a gitea container with git.example.com and maybe more, with the same structure.

I try to configurate the docker-compose.yml of the example, but I can’t connect to any service now.
Please, can somebody help me.

the basic configuration is the same like the example.

Thank you.