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

Nextcloud version: 28.0.3.2
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"
services:
  nextcloud:
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
    environment:
      - PUID=3000
      - PGID=100
      - TZ=Europe/London
      - PHP_MEMORY_LIMIT=2G
      - PHP_UPLOAD_LIMIT=10G
    volumes:
      - /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
    expose:
      - "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!