I think this is a problem:
for some reason your CODE doesn’t recognize it’s scheme.. maybe there is a missing --o:ssl.termination=true see Collabora Integration guide and Collabora CODE for Nextcloud with Docker
than you should either educate yourself or stop trying to maintain such complex integration.