Problem/Motivation
The "start-demo" command is useful for spinning up a demo, but it doesn't load up the detached mode, and it's limited in what you can make available before doing the site installation.
I'm using Drupal Flake often to spin up test or demo environments for particular modules or features. I want an easy way to get a blank site up, from a variety of sources, and then let me do the installation.
Thus, extracting the base composer create-project and then copy into the project root and configure the .env file all in one go would streamline this process -- that is what setup-drupal can do.
Secondarily, the default.settings.php file is really long and hard to manage -- and always available as a reference anyway. We prefer having really short, just-the-essentials settings.php files that then can include environment-specific files.
So I'm adding a setup-settings script to generate one of these as just the minimal version. Setup-drupal calls this at the end, so spinning up a new site becomes 5 commands.
Proposed resolution
After these are in place, setup on any system that has Nix, in an empty directory should become:
- nix flake init -t git+https://git.drupalcode.org/project/drupal_flake
- direnv allow (if you have direnv installed/configured)
- setup-drupal
- (answer prompts, can just enter several times to accept defaults)
- direnv reload (or nix develop again - pick up new .env settings)
- start-detached (may need to wait a few seconds for db server to start up)
- drush site:install
Comments
Comment #2
freelockUpdate IS -- it looks like direnv reload is required, after writing the .env file, or you won't pick up the correct settings.
Comment #4
freelockThese are done.