If you’re in the USA or Canada, schedules direct works very well, or at least it used to. I haven’t messed with it in years.
Typical completely useless article from medium.com
I’m not sure if your goal is to set up nextcloud or to learn docker compose while setting up nextcloud. If you just want it up and running, you could use DockSTARTer to get it going. Heck, even if your goal is mainly learning, you can always tear apart the compose file that dockstarter generates and compare it to your own.
My knowledge of docker probably rates around 3/10, but I suspect your containers aren’t sharing a network, so their definition of localhost is different.
https://maximorlov.com/4-reasons-why-your-docker-containers-cant-talk-to-each-other/
I asked people to take handover for a full month before I left and nobody cared. In my last day they kept asking if they could call me with questions. I said only if they had their credit cards ready because I wasn’t going to work for free.