Open geerlingguy opened 5 years ago
Note that this can have interesting results if it's in an environment with multiple replicas. See: https://github.com/geerlingguy/raspberry-pi-dramble/issues/139
It's fine for testing / evaluation purposes... but you really need a dynamic/environment-variable-driven settings.php file if you want to scale to more than one pod/container.
In the Kubernetes world, it might be possible to avoid conflict using an initContainer
.
In that container, check if Drupal is installed. If so, exit. If not, run the install then exit.
I never really completed https://github.com/geerlingguy/drupal-container/issues/1 ... I want to make it so, if there are database credentials provided, and an env variable like
DRUPAL_INSTALL_IF_NOT_PRESENT
istrue
, then we use Drush to install Drupal... maybe?Basically, it would take another step out of the first-use/testing order of operations for this image. Mostly, I'm thinking of how it relates to the Raspberry Pi Dramble. Right now after setting everything up, you have to run through the Drupal installer via UI to complete the Drupal installation.
Not that that's horrible or anything, it just takes a little extra time, and isn't automatic. I hate things that aren't automatic.
If Drupal is already installed (or
DRUPAL_INSTALL_IF_NOT_INSTALLED
is set tofalse
), then this new code that does the installation should not be run.