ataylorme / Advanced-WordPress-on-Pantheon

MIT License
65 stars 32 forks source link

Lando local dev #112

Closed ataylorme closed 6 years ago

ataylorme commented 6 years ago

@pirog I am attempting to run gulp through Node and run Composer when Lando starts. Currently, only Composer runs but if I comment out the Composer section gulp will run.

Any thoughts? Seems odd one or the other will run but not both together. Maybe I am hooking into the wrong place.

ataylorme commented 6 years ago

@stevector can you test the Local Development instructions in the README of this pull request? Things are working well for me but I would like to verify someone else can use Lando and gulp before merging.

populist commented 6 years ago

+1 to this approach from me.

I had to install gulp globally inside the Lando container for the build commands to work, but afterwards it all worked great for me.

ataylorme commented 6 years ago

@populist would it help if I added a troubleshooting section to the README?

Maybe something like: Having issues with gulp? Make sure it installed properly in your Lando app by running lando npm install -g gulp-cli.

ataylorme commented 6 years ago

@stevector Try adding a wp-cli.yml file in the git root (not ./web) with the contents path: web/wp and see if that helps.

We can schedule a time to go through this too. I'll look for something.

ataylorme commented 6 years ago

Behat tests are hanging on cache clears. Seems to be a platform issue. Going to let it settle and re-run in the morning.

screen shot 2018-06-05 at 5 35 26 pm
ataylorme commented 6 years ago

Lighthouse test passed! The score of 69 isn't less than the acceptable score of 63 (5 less than the score of 68 on the master branch)

View the full Lighthouse performance report for lando-local-dev and compare it to the Lighthouse performance report for the master branch

ataylorme commented 6 years ago

Visual regression test passed!

View the visual regression test report

pirog commented 6 years ago

@ataylorme, Late to the party here but you can define global node deps in the .lando.yml with the globals key

services:
  # Spin up a node service so we can run gulp
  node:
    type: node:custom
    ssl: true
    globals:
      gulp-cli: latest # <-- this is normal package.json syntax
    overrides:
      services:
        ports:
          # expose port 3000 for BrowserSync
          - "3000:3000"
        # use a custom Docker image
        image: ataylorme/docker-node-advanced-wordpress-on-pantheon:latest

Here is an express example we've got rolling with similar global-install-thing if its helpful!

ataylorme commented 6 years ago

Thanks for the info @pirog. I tried globals but having the global installation run on every Lando spinup was slow. I prefer to have everything in the custom docker container and manage versions there.