getgrav / docker-grav

Official Docker Image for Grav
https://getgrav.org
199 stars 123 forks source link

Populate user dir once (#44) #52

Open fanks4 opened 1 year ago

fanks4 commented 1 year ago

I found another way to install grav by populating user dir if empty during container start. Therefore i skip user dir during build. A script will then populate /var/www/user as described in README.md This commit also includes https://github.com/Freiheitswolke/docker-grav/tree/fix/volume and some changes to README.md to reflect the changed volumes. The commit will not break the old way with a mount for the whole '/var/www/html' for those who want to upgrade grav via the admin console. (If '/var/www/html' is mounted you need to populate the whole directory yourself after starting the container anyway.) Building or pulling the container image with the new version of grav is a more proper way to perform upgrades in my opinion.

Closes getgrav#44

Kind regards and thank you for all the great work so far Simon

joshua-jerred commented 8 months ago

This works great a year later still.

For anyone still looking to use this, use these changes along with a source image change to php:8.1.18-apache-bullseye. As long as the lines mentioned #49 are commented out, everything works great.