platformsh / legacy-cli

This is the legacy version of Platform.sh's command-line interface. The new version is at: https://github.com/platformsh/cli
https://docs.platform.sh/administration/cli.html
MIT License
224 stars 121 forks source link

cli can't find project root on platformsh #705

Open yobottehg opened 6 years ago

yobottehg commented 6 years ago

Drush9 dropped remote to remote connections for sql-sync and rsync.

So for syncing dbs and so on we need to connect to the remote first on run the commands from there. See : https://github.com/drush-ops/drush/issues/3408

For this to work we need to create the drush aliases on the servers which is not possible atm because platformsh is not able to find the project root on the platformsh server.

web@1234567890-master-123456--backend:~$ platform drush-aliases

[RootNotFoundException]                                                      
Project root not found. This can only be run from inside a project directory.

I see 2 possiblities here:

The goal is to be able to do this for example: lando drush @project.branch1 sql-sync @project.branch2 @self

Any chance to get some feedback on this?

pjcdawkins commented 6 years ago

It'll never be a "project" root, because while you're on a platform.sh shell you're inside one app on one environment. So the solution has to be a bit different.

Can Lando just use the CLI to sql/sync between two environments from the outside? Either platform sync data (to sync all data in all services from the parent env) or:

platform db:dump -e SOURCE_ENV -o | platform sql -e DEST_ENV