I have managed to change the upload size limit:
cat fix-upload-size.sh (which needs to be chmod +x):
#!/bin/sh
sed -i 's/client_max_body_size .*;/client_max_body_size 500m;/' /etc/nginx/conf.d/discourse.conf
in docker-compose.yml:
volumes:
- ./fix-upload-size.sh:/etc/runit/1.d/fix-upload-size