webksde / ddev-vscode-devcontainer-drupal-template

Drupal DDEV based development container with attached Visual Studio Code
23 stars 3 forks source link

Introduce drowl-init-from-existing (--remote) command #59

Open JPustkuchen opened 2 years ago

JPustkuchen commented 2 years ago

Context:

Existing Drupal project (online) should be fetched from remote to work on it locally (like drowl-init-from-existing) easily.

The Drupal Project typically consists of:

As config and content are both contained in the database and are up to date there, for a first step we should concentrate on the database instead of fetching configuration.

Steps after 9 are equal to drowl-init-from-existing so perhaps it might make sense to select the source in the first step of drowl-init-from-existing => From local files or From Remote? if no such parameter (--local / --remote) is given.

Required information for fetching from remote:

Steps to take (UX - pseudo):

  1. Run drowl-init-from-existing-remote (difer)
  2. Enter Remote Server Connection (user@host:[port])
  3. Connect (using ssh key auth)
  4. You are in directory XXX, enter the path to the project directory (absolute or relative)
  5. /var/www/xz/123/abc/drupal
  6. Check if composer.json is in directory and contains "name": "drupal/recommended-project" => Give success or error message
  7. Read database name from settings.php => The used remote database name is "XXX", is this correct?
  8. Fetch composer.json and database XXX from remote and import into project?
  9. Do it...

Further improvements (low prio):

Out of scope