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:

  1. nix flake init -t git+https://git.drupalcode.org/project/drupal_flake
  2. direnv allow (if you have direnv installed/configured)
  3. setup-drupal
  4. (answer prompts, can just enter several times to accept defaults)
  5. direnv reload (or nix develop again - pick up new .env settings)
  6. start-detached (may need to wait a few seconds for db server to start up)
  7. drush site:install

Remaining tasks

User interface changes

API changes

Data model changes

Comments

freelock created an issue. See original summary.

freelock’s picture

Issue summary: View changes

Update IS -- it looks like direnv reload is required, after writing the .env file, or you won't pick up the correct settings.

  • freelock committed b9c39fe5 on 1.0.x
    feat: #3610130 Create new setup-drupal and setup-settings scripts
    
freelock’s picture

Status: Active » Fixed

These are done.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.