Where is the correct .user.ini file in a Docker setup and how to increase file max size?

Nextcloud version:
Operating system and version: Linux 6.1.55-production+truenas x86_64
Apache or nginx version: nginx/1.24.0
PHP version: 8.3.4

The issue you are facing:
Some of the users in our cloud are experiencing issues downloading a large (4.5GB) file both from the browser and when trying to have the macOS desktop client sync the respective folder, namely both begin, but do not end.

I’ve read the documentation, and particularly this section, but I can’t figure out the correct .user.ini file to add the necessary PHP variables.

I’m running Nextcloud in Docker, here’s the docker-compose.yaml:

version: "2.1"
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
      - PUID=3000
      - PGID=100
      - TZ=Europe/London
      - /mnt/apps/data/nextcloud:/config
      - /mnt/data/nextcloud:/data
      - /mnt/data/temp:/temp
      #- /mnt/data/nextcloud/.htaccess:/app/www/public/.htaccess
      #- /mnt/data/nextcloud/.user.ini:/app/www/public/.user.ini
      - "443"
    restart: unless-stopped

The two PHP environment variables don’t seem to do anything (according to Administration > System). Also, as you can see from the commented out lines in volumes, I’ve tried linking the .user.ini file I found in /app/www/public, but that didn’t work either. I’ve also created a new .user.ini file in /config - to no avail.

Here’s what I’ve added to either:

upload_max_filesize = 16G
post_max_size = 16G
max_input_time = 7200
max_execution_time = 7200
memory_limit = 2G

Could someone help me figure out what I’m doing wrong, please?

Thank you!