This is more of a Docker question than an n8n one but it is an interesting one, It looks like you might be able to use the below option in your compose file.
the ~/.n8n folder that it gets created on host (not the /home/node/.n8n that is docker’s container volume) is assigned with user id 1000 no matter what and i want that folder to be belong to someone’s else user.
Tried to google but didn’t find a correct way yet.