docker-flarum icon indicating copy to clipboard operation
docker-flarum copied to clipboard

Startup and install slow due to chown

Open askvortsov1 opened this issue 4 years ago • 7 comments

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.

askvortsov1 avatar Apr 07 '20 05:04 askvortsov1

I can suggest an environment variable to disable chown?

Magicalex avatar Apr 07 '20 05:04 Magicalex

@askvortsov1 fixed in this commit 2c9e12466085

Magicalex avatar Nov 21 '20 00:11 Magicalex

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

antl3x avatar Nov 18 '21 18:11 antl3x

@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.

Marty avatar Mar 02 '22 10:03 Marty

antl3x avatar Apr 24 '22 12:04 antl3x

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.

Magicalex avatar Apr 27 '22 22:04 Magicalex

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?

LoneDev6 avatar Dec 02 '22 15:12 LoneDev6