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

Specify services/tooling via "lando init" #210

Open
klonos opened this issue Dec 12, 2020 · 9 comments
Open

Specify services/tooling via "lando init" #210

klonos opened this issue Dec 12, 2020 · 9 comments

Comments

@klonos
Copy link

klonos commented Dec 12, 2020

I've already read https://docs.lando.dev/basics/init.html and know that I can for example do this:

lando init \
  --source remote \
  --remote-url https://github.com/drupal/drupal.git \
  --remote-options="--branch 8.9.x --depth 1" \
  --recipe drupal8 \
  --webroot ./docroot \
  --name d8test \
  --option composer_version=2.0.7 \
  --option database=mariadb

Which results in this:

name: d8test
recipe: drupal8
config:
  webroot: ./docroot
  composer_version: 2.0.7
  database: mariadb

Can lando init accept parameters for setting other things, like services and tooling? For example, I would like to end up with:

name: d8test
recipe: drupal8
config:
  webroot: ./docroot
  composer_version: 2.0.7
  database: mariadb

services:
  appserver:
    extras:
      - bla bla
      - bla bla bla
  phpmyadmin:
    type: phpmyadmin
    hosts: database

tooling:
  drush:
    service: appserver
    cmd: drush --root=/app/docroot --uri=http://d8test.lndo.site
@pirog
Copy link
Sponsor Member

pirog commented Dec 14, 2020

@klonos i dont think so, probably not something we will support in this iteration of lando but could be a cool feature for the future.

@klonos
Copy link
Author

klonos commented Dec 14, 2020

Thanks for considering this @pirog 👍

I would like to note that the workaround for this so far has been to be using "template" .lando.yml files, with "placeholders" in them, and then using custom scripts + sed and the likes to do replacements and copying. Not ideal.

@stale
Copy link

stale bot commented Jun 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

@stale stale bot added the stale label Jun 16, 2021
@stale
Copy link

stale bot commented Jan 10, 2022

We haven't heard anything here for about a year so we are automatically closing this issue to keep things tidy. If this is in error then please post in this thread and request the issue be reopened!

@stale stale bot closed this as completed Jan 10, 2022
@klonos
Copy link
Author

klonos commented Jan 14, 2022

I think that this is still relevant and worth pursuing.

For parity between command parameters and what gets added to the .lando.yml file, I'd ideally expect things like this:

  • --config database=mariadb (with the current --option still working for backwards compatibility of course) to result in this:
    config:
      ...
      database: mariadb
  • --services phpmyadmin.type = phpmyadmin and --services phpmyadmin.hosts = database to result in this:
    services:
      phpmyadmin:
        type: phpmyadmin
        hosts: database
  • --tooling drush.service = appserver and --tooling drush.cmd = "drush --root=/app/docroot --uri=http://d8test.lndo.site" to result in this:
    tooling:
      drush:
        service: appserver
        cmd: drush --root=/app/docroot --uri=http://d8test.lndo.site

@pirog
Copy link
Sponsor Member

pirog commented Jan 14, 2022 via email

@klonos
Copy link
Author

klonos commented Jan 19, 2022

Fair enough 👍🏼 ...thanks for the update @pirog. Still, this issue should remain open, right?

@yorkshire-pudding
Copy link

I agree this would be a great feature and this should be re-opened please @pirog

@AaronFeledy AaronFeledy removed the stale label Aug 22, 2023
@AaronFeledy AaronFeledy reopened this Aug 22, 2023
@pirog pirog transferred this issue from lando/lando Aug 22, 2023
@haveboard
Copy link

Would really love this feature, or at least a note on the init docs that 'services' currently cannot be applied using init.

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

5 participants