Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow drush site-install to save db credentials, active/staging config directories, and hash_salt in settings.local.php #246

Open
klonos opened this issue Aug 16, 2021 · 2 comments

Comments

@klonos
Copy link
Member

klonos commented Aug 16, 2021

Backdrop core already supports reading configuration from a settings.local.php file (see https://github.com/backdrop/backdrop/blob/1.x/settings.php#L458), although there's no such file shipped with core OOTB - it needs to be created manually.

Drush currently supports this:

drush si standard --db-url=mysql://root:backdrop@localhost/backdrop --site-name="My test site"

Additionally, I would like to be able to do something like this:

drush si standard --db-url=mysql://root:backdrop@localhost/backdrop --site-name="My test site" --settings-path=settings.local.php

This would allow the settings.php file in my local to remain unchanged, so that I do not have to manually exclude it when doing git add (settings.local.php is automatically excluded OOTB: https://github.com/backdrop/backdrop/blob/1.x/.gitignore#L5).

As it is now, I have to:

  1. run drush si -> things get saved into settings.php
  2. manually create a settings.local.php file
  3. manually copy things from settings.php to settings.local.php

Allowing drush si to accept a parameter to specify the settings file would save me the 2 manual steps from the process above.

@oadaeh
Copy link

oadaeh commented Aug 16, 2021

AFAIK, the future of CLI for Backdrop is https://github.com/backdrop-contrib/bee

@yorkshire-pudding
Copy link

I'm not sure how drush does the site install, but for bee it uses core/scripts/install.sh which in turn uses core/includes/install.core.inc which has the filename hard-coded in as settings.php.

Without changes to core to support this, I can't see how any CLI using these functions would be able to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants