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

Create Pattern for adding local environment to build tools site #384

Open
aweingarten opened this issue Apr 13, 2021 · 1 comment
Open

Comments

@aweingarten
Copy link
Contributor

Once I have created a project with build tools its really hard to set up a local environment. If I try lando init

I see

Whoooops! Looks like you've already got a git repo here!
Either delete this repo or try to lando init in a folder without .git in it
@aweingarten aweingarten changed the title Create Pattern for setting up a local environment Create Pattern for adding local environment to build tools site Apr 13, 2021
@eddiegeis
Copy link

The Example WordPress Composer repo readme has a section for Working locally with Lando. I have copied the steps on the readme below with some additional notes on what I needed to do to get this to work with WordPress. I assume Drupal would be similar.

  1. Install Lando, if not already installed.
  2. Clone your project repository from GitHub (or GitLab or BitBucket) locally.
  3. Manually create a .lando.yml file with your preferred configuration, based on the WordPress recipe.
    • To get this to work with the build tools, I used the following .lando.yml using the pantheon recipe instead.
name: [pantheon-site-name]
recipe: pantheon
config:
  framework: wordpress
  site: [pantheon-site-name]
  id: [pantheon-site-id]
  composer_version: '1.10.20'
  1. Run lando start to start Lando.
    • Save the local site URL. It should be similar to https://<PROJECT_NAME>.lndo.site.
  2. Run lando composer install --no-ansi --no-interaction --optimize-autoloader --no-progress to download dependencies
    • I received an error when running this command that is centered around the commands located at /scripts/composer/cleanup-composer . To get the lando site working, I manually completed the steps in those commands.
      1. Copy contents of web/wp/wp-content/mu-plugins/ to web/wp-content/mu-plugins/
      2. Delete file web/wp/wp-config.php
      3. Delete folder web/wp/wp-content
  3. Run lando pull --code=none to download the media files and database from Pantheon.
  4. Visit the local site URL saved from above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants