Run container as local user, not 1500

Environment

Invoice Ninja Version: v5.10.42
Environment: Docker Compose version v2.29.7 and Docker Engine 27.3.1

Describe the bug

I am running Invoice Ninja and it is working. In order to make it work I had to sudo chown -R 1500:1500 docker/app as per the Readme. I would prefer to run it as a user of my choosing, i.e my local user 1000:1000. This is so files and folder are created and owned by my local user in the mapped volumes.

Steps To Reproduce

If I do not sudo chown -R 1500:1500 docker/app I get permission issues. I have tried setting user: 1000:1000 in my compose file. I have also tried the Linux Server method of setting Environment variables, PUID: 1000 and PGID: 1000 as outlined in the DBTech Youtube video linked in the Readme.

Expected Behavior

I expect to be able to run Invoice Ninja as a user of my choosing by mapping my local user to the 1500 user inside the container. This is a widely used practice in Docker containers.

Additional context

I have read lots of posts that touch on this subject but can’t find a definitive answer.

Logs

rm: can't remove '/var/www/app/docker-backup-storage/framework/views/1c59899626b4bc181ec5cda1cd5a111f.php': Permission denied

Hi,

I suggest creating an issue on the Docker repo.