Nextcloud 20 occ works, browser returns internal server error

I’ve set up Nextcloud 20 using with redis and postgres on a Raspberry Pi docker swarm running Ubuntu 20.04 with this docker-compose file:

version: '3.3'

services:

redis:
image: redis
volumes:
- nextcloud-redis:/data
command: redis-server --requirepass yRSDqpdhW2v5nMq59BhQ
networks:
- backend

nextcloud:
image: nextcloud
depends_on:
- redis
volumes:
- /opt/nextcloud/html:/var/www/html
- /opt/nextcloud/config:/var/www/html/config
- nextcloud-data:/var/www/html/data
- ‘/var/run/docker.sock:/var/run/docker.sock:ro’
environment:
- POSTGRES_HOST=storage01.mabeltron.co.uk
- POSTGRES_PASSWORD=20g1KQNdTvU4tVK0
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- NEXTCLOUD_ADMIN_USER=xncadmin
- NEXTCLOUD_ADMIN_PASSWORD="alec levi slab yoke ago "
- REDIS_HOST=redis
- NEXTCLOUD_TRUSTED_DOMAINS=microcloud.mabeltron.co.uk
- TRUSTED_PROXIES=10.0.0.0/8
networks:
- traefik-public
- backend
# If you like to bypass traefik, then uncomment these two lines. Nextcloud will then be available on port 80
# Remember to allow the port temporarily on your firewall: sudo firewall-cmd --zone=public --add-port=80/tcp

ports:
  - "81:80"
logging:
  driver: json-file
  options:
    max-size: '12m'
    max-file: '5'

php occ works inside the nextcloud container, but when I try to access the installation in a browser I get this error:

Internal Server Error

The server encountered an internal error and was unable to complete your   request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

The server log contains:

{"reqId":"41nVVgaQOddkimStUtVU","level":3,"time":"2020-10-24T14:18:56+00:00","remoteAddr":"10.0.0.2","user":"--","app":"core","method":"GET","url":"/favicon.ico","message":{"Exception":"RedisException","Message":"NOAUTH Authentication required.","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Memcache/Redis.php","line":55,"function":"get","class":"Redis","type":"->","args":["745d3b2d94375c744a37745f6b7c8e7a/JS-2e7f5d45cace6c6e3d636128f0b15756core-merged-template-prepend.js.deps"]},{"file":"/var/www/html/lib/private/Template/JSCombiner.php","line":123,"function":"get","class":"OC\\Memcache\\Redis","type":"->","args":["core-merged-template-prepend.js.deps"]},{"file":"/var/www/html/lib/private/Template/JSCombiner.php","line":103,"function":"isCached","class":"OC\\Template\\JSCombiner","type":"->","args":["merged-template-prepend.js.deps",{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"}]},{"file":"/var/www/html/lib/private/Template/JSResourceLocator.php","line":116,"function":"process","class":"OC\\Template\\JSCombiner","type":"->","args":["/var/www/html","core/js/merged-template-prepend.json","core"]},{"file":"/var/www/html/lib/private/Template/JSResourceLocator.php","line":72,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->","args":["/var/www/html","core/js/merged-template-prepend.json"]},{"file":"/var/www/html/lib/private/Template/ResourceLocator.php","line":79,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->","args":["js/merged-template-prepend"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":364,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->","args":[["core/js/dist/main","js/dist/files_fileinfo","js/dist/files_client","js/merged-template-prepend","core/l10n/en_GB"]]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":194,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::","args":[["core/js/dist/main","js/dist/files_fileinfo","js/dist/files_client","js/merged-template-prepend","core/l10n/en_GB"]]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":183,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":332,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/index.php","line":63,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[{"__class__":"RedisException"},500]}],"File":"/var/www/html/lib/private/Memcache/Redis.php","Line":55,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"20.0.0.9"}

Which indicates that redis isn’t connecting. The redis password is set in config.php and changing it to false makes occ throw an error, which would suggest that redis is configured correctly. php occ status doesn’t show anything wrong, and I have deleted the images a couple of times. At the moment I’m trying to recreate from scratch but this is now returning an internal server error in the browser but with the stock theme. Apart from the NOAUTH error I can’t see what is happening.

I have the same problem, have you found a solution?

Unfortunately not, I ended up installing from code and couldn’t reproduce it.