fix: make fix-perms idempotent and persistent across container restarts
The getgrav/grav image is Debian-based and has no uid 1000 user, causing Apache to fail switching to APACHE_RUN_USER=#1000 on restart. fix-perms now creates the uid 1000 user if absent, sets ownership, then gracefully reloads Apache workers so they run as uid 1000. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,9 @@ stop:
|
|||||||
setup: start install-plugins fix-perms
|
setup: start install-plugins fix-perms
|
||||||
|
|
||||||
fix-perms:
|
fix-perms:
|
||||||
|
docker exec intotheeast_grav bash -c "getent passwd 1000 > /dev/null || useradd -u 1000 -M hostuser"
|
||||||
docker exec intotheeast_grav chown -R 1000:1000 /var/www/html
|
docker exec intotheeast_grav chown -R 1000:1000 /var/www/html
|
||||||
|
docker exec intotheeast_grav apachectl graceful
|
||||||
|
|
||||||
install-plugins:
|
install-plugins:
|
||||||
docker exec -w /var/www/html intotheeast_grav php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y
|
docker exec -w /var/www/html intotheeast_grav php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y
|
||||||
|
|||||||
Reference in New Issue
Block a user