Open j4-m opened 2 years ago
Isn't the purpose of the create project for people to actually use as the basis for building their own sites? We cannot assume everyone uses Lando, BHCC Does not except for explicit development on Localgov Drupal (Mute point though since we arn't using the project and integrating modules in our own site). I assume the tests install through create-project without installing Lando on Github.
There is also the issue on Docker Desktop (required by Lando on Windows / Mac) is going pay for more users, and may have impact for councils if we force Lando as the only development solution.
Perhaps the way forward is to include both sets of instructions, one if you have composer and are building a new site, and one for if you are building with Lando for developing Localgov Drupal.
Thanks for your feedback @andybroomfield, I totally agree. As you say, it's reasonable that someone will want to install LGD without using Lando and we should make that as easy as possible so having different guides, one for Lando another installing on a host, seems like the way forward.
I do still think the original sentiment of this issue stands however, if a user does want to use Lando then we shouldn't require them to have Composer\PHP installed locally...
I got caught out by not having a php module installed on my host machine, so composer dependencies bailed.
I'd be happy if we could offer a way to install without needing PHP on the host machine.
Fancy putting together a pull request based on your suggestions above @j4-m ?
Hey @j4-m ! Would you like to take this one further?
Yes I do. Should only involve a small update to the installation doc.
I agree that it's best to use DDEV or Lando's PHP/Composer, and not require it on the host machine. These simple steps work well in DDEV:
mkdir localgov && cd localgov
ddev config --project-type=drupal --php-version=8.3 --docroot=web
ddev start
ddev composer create localgovdrupal/localgov-project
ddev drush site:install localgov -y
Originally posted in How to create a local install with DDEV.
Hi folks
I'd like to gather some views on a problem. Presently the first step in our local development set up is:
composer create-project --stability dev localgovdrupal/localgov-project MY_PROJECT --remove-vcs
While this is a low-friction way to get started it does have the following problems:
The major advantage of using Lando is we only require users\developers to have Lando\Docker installed furthermore if the user
composer install
s on a different version of PHP to what's being used in Lando this has the potential to cause compatibility problems.There is an issue on Lando's Github which relevant; as you can see there is presently no feature in Lando to address this though it does sound like this is something DDev has solved there's potential for this feature to be added to Lando.
In the meantime I believe we have some options to workaround this and give a better DX to boot. For example, we could have a one-liner such as:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/localgovdrupal/localgov_project/master/tools/install.sh)"
With
install.sh
looking something like:Though I'm sure there's other, and better, ways we could do this hence this issue.
Admittedly, this isn't a problem which is relatively high priority at the moment but as the PHP version required by Drupal core rolls on and the LGD user base grows it has the potential to be a sticking point.