mondediefr / docker-flarum

:speech_balloon: :whale: Docker image of Flarum
https://hub.docker.com/r/mondedie/flarum
MIT License
507 stars 131 forks source link

Startup and install slow due to chown #52

Open askvortsov1 opened 4 years ago

askvortsov1 commented 4 years ago

Whenever the docker container is started, every folder and file in /flarum is chown'ed to a special user created for running flarum (UID 991 by default). This is extremely slow, and if multiple extensions are installed, can take multiple minutes to complete.

al3xLvs commented 4 years ago

I can suggest an environment variable to disable chown?

al3xLvs commented 4 years ago

@askvortsov1 fixed in this commit 2c9e12466085

antl3x commented 3 years ago

The [flarum] [INFO] Setting folder permissions step is taking more than 8 minutes on my machine.

Marty commented 2 years ago

@Magicalex I can confirm that this still takes nearly 10 minutes on a quick machine. The fix does not appear to be working as expected. (Or it took even longer before ...).

Do all files in /etc/s6.d /run/php /var/log /var/lib/nginx really have to be chowned every time? Maybe this can be done differently by using groups. The whole php and flarum installation belongs to group flarum and the $UID is just added to the group? I saw that we did something like this at work.

antl3x commented 2 years ago

![]()

al3xLvs commented 2 years ago

Do all files in /etc/s6.d /run/php /var/log /var/lib/nginx really have to be chowned every time?

No, i'm not sure. I need to dive back into it. I am interested in your solutions.

LoneDev6 commented 1 year ago

Issue is still here. A fix is really needed since 2 years passed and each restart of the flarum instance takes ages to load. Is there any solution to this? Why is it necessary to run chown on each start?