tiredofit / docker-wordpress

Dockerized Content Management System many with customizable options
MIT License
36 stars 7 forks source link

New env variable FORCE_RESET_PERMISSIONS to control resetting nginx webroot permissions #12

Closed juanluisbaptiste closed 3 years ago

juanluisbaptiste commented 4 years ago

Hi,

Copy paste from the other PR docker-nginx ownership adjustsments are also done here.

Some times it is not a good idea to always force webroot ownertship at container boot, for example when you have a very big webroot that is over NFS, and several containers will be doing that at the same time over the same files.

This PR adds a new env variable called FORCE_RESET_PERMISSIONS to control if ownership of files should be done.

Would it make sense to leave chown's on the nginx image ? only run them when it is a new wordpress install, or better yet, make 09-nginx run last ?

tiredofit commented 4 years ago

I think it would be good if I started integrating this into all of my images. I have it all over the place due to some quirks related to installing and also as a santiy check as sometimes I have people heading into our exported folders and making changes to files/adding files under the wrong uid which drives me up the wall. It should be quite easy to rework this as it usually sits in every single one of my images as the last statement, except in event of doing things like install where its all over the place. At some point I'm moving things towards doing installs more so under the ${NGINX_USER} and moving away from executing things as root. That's going to take a wee bit longer. I'll start thinking about this over the holidays and start work in the NY.

juanluisbaptiste commented 4 years ago

Excellent, have a nice holidays.

tiredofit commented 4 years ago

New images are just in testing on my private servers now. Couple more days and I'll be merging them to Github.

juanluisbaptiste commented 4 years ago

Excellent :+1:

tiredofit commented 4 years ago

I've thrown Docker Hub on a loop for building - The images that are there are indeed working, but there are new ones coming within the next 24 hours. Might want to let it settle down before you proceed for usage.

juanluisbaptiste commented 4 years ago

Excellent, for now I'm using my own images with this change so no worries for now.