Lando + Sage @localhost with https and hostname

Installed Lando with wordpress recipe

I’m able to use hostname.domain to access my wordpress installation

however, I can’t make sage proxy work in order to use browserify hmr

during sage installation, when he asks me for my local development url, I don’t know what to pass (tried: http://appserver.peticov.internal, https://appserver.peticov.internal, http://appserver_apache.peticov.internal, https://appserver_apache.peticov.internal)

here my lando.yml

name: peticov
recipe: wordpress
proxy:
  appserver:
    - peticov.art
  theme:
    - localhost:3000
config:
  php: '7.2'
  via: apache
  webroot: web
  database: mariadb
  xdebug: true

services:
  theme:
    type: node
    services:
      ports:
        - 3000:3000
tooling:
  yarn:
    service: theme

How do I find my container’s internal URL? From the guide I was following, if I were using nginx it would be appserver_<service>.<app>.internal but If I change my proxy config to apache instead of appserver it says apache is not part of my app.

The appserver is available internally as appserver if I recall correctly.

But that’s not needed. Lando will automatically connect everything together correctly. I am guessing your issue has to do with the custom appserver domain. It’s recommended you use the stock address of project.lndo.site, which in your case would be peticov.lndo.site and remove proxy: appserver: - peticov.art

You also want to remove services from under theme it’s redundant.

My working lando.yml:

name: iiba
recipe: wordpress
config:
  php: 7.3
  database: mysql:5.7.27
  xdebug: false

proxy:
  theme:
    - localhost:3000

services:
  database:
    portforward: 33061 # offer a reliable port to local MySQL apps
  appserver:
    build:
      - printf "\n\nInstall app dependencies\n"
      - cd /app && wp package install --quiet git@github.com:alwaysblank/blade-generate.git
      - cd /app &&  wp package install --quiet wp-cli/find-command
    run:
      - printf "\n\nInstall composer dependencies\n"
      - cd /app/wp-content/themes/iiba/ && composer install
      - echo "Include /app/dev_assets/scripts/hosts" >> ~/.ssh/config
  theme:
    type: node:10  # https://docs.lando.dev/config/node.html#configuration
    ports:
      - '3000:3000'
    run:
      - printf "\n\nInstall yarn dependencies\n"
      - yarn config set disable-self-update-check true
      - cd /app/wp-content/themes/iiba/ && yarn install

tooling:
  yarn:
    service: theme

docs.lando.dev/guides/updating-to-rc2.html#internal-service-name-changes
says “The names of these services will be the same as before except they will now be prefixed by the service that generated them. For example if you have a php service using nginx and it is named appserver then Lando will spin up an internal nginx service called appserver_nginx.”

This topic was automatically closed after 42 days. New replies are no longer allowed.