How about adding an option to the "drush quickstart-create" command, to allow it to create a drush site alias (ie, create or append to a site aliases file)? For example, something like --alias=example.

p.s. - I'm a big fan of Quickstart and use it every day. Thanks for all the hard work and for sharing it.

Comments

MichaelCole’s picture

Hey Matt,

Thats a great idea, I was unaware of this feature in drush. Cool!

What would this work in practice?

drush quickstart-create --alias=example --domain=example.dev

would append:

$aliases['example'] = array(
  'uri' => 'example.dev',
  'root' => '/home/quickstart/websites/example.dev', 
  'domain' => 'example.dev',
  'makefile' => '/home/quickstart/websites/default.make',
  // All the other quickstart default parameters here for posterity
);

These commands would both find the domain and codepath from the URI:

drush quickstart-delete @example 
drush quickstart-fixperms @example

Would it be useful to also add?
- '127.0.0.1 example' to /etc/hosts
- 'ServerAlias example' to apache config
This would allow http://dev in a browser

Anything I missed?

Any way to simplify it?

Are "uri" and "domain" synonyms? How about "root" and "codepath"?

Thanks Matt,

Mike

matt v.’s picture

I'm not sure I understand what you're saying, when you refer to quickstart-delete and quickstart-fixperms above. However, it does sound like the terms you're using for domain and codepath map to the sitealias file's uri and root respectively. I think the example.aliases.drushrc.php file will clarify most of your questions.

Hmm... I do like the option of adding the alias to hosts & apache config.

MichaelCole’s picture

Component: Code » Drush
undersound3’s picture

I would like to see this feauture as well but I'm unsure how to read #3 status of the issue.
Could not find it here http://drupal.org/node/156119.

Should this already be working or?

matt v.’s picture

@undersound3, the change in reply #3 was to change the "component" of Quickstart that the issue is associated with. In this case, the issue was narrowed down specifically to the Drush code in Quickstart. The "status" of the issue remains "active".

You can always check the status at the top of the issue, which reflects the latest attributes of the issue (status, priority, etc.).

undersound3’s picture

I see, thanks for explaining

dominikb1888’s picture

This would be an awesome feature, however ref to #1 why not add an alias which defaults to the domain of the site as default

MichaelCole’s picture

Status: Active » Closed (fixed)

Added to the new QS 2.0 requirements doc.