Nextcloud docker image running behind a Proxy requires a reverse-proxy.config.php for the webserver to generate secure outgoing links. The file is located in the docker container on path:
/var/www/html/config/reverse-proxy.config.php
Can be mounted. Make sure the update doesn't brake the config.