2

I'm creating a custom service in Lando for a Drupal 8 project. This is my first time really trying to add a service through the docker compose method and I'm not sure what I'm doing, even after looking at the Lando docs. My .lando.yml file is below. Afte running lando start though, I get error: (HTTP code 500) server error - container <portainer container ID> is not connected to the network lando_bridge_network

name: drupal8
recipe: drupal8

config:
  php: 7.2
  via: apache
  webroot: web
  xdebug: false
  conf:
    php: lando/config/php.ini
    mysql: lando/config/my.cnf

 services:
  database:
    type: mysql:5.7
  pma:
    type: phpmyadmin
    hosts:
      - database
  appserver:
    composer:
      phpunit/phpunit: '*'
      behat/behat: 3.3.1
    run:
      - "ln -s /usr/local/bin/composer /usr/local/bin/composer.phar"
  portainer:
    type: compose
    services:
      image: portainer/portainer
      command: /opt/bin/entry_point.sh -d /data -H tcp://localhost:9001

tooling:
  phpunit:
    service: appserver
    description: run PHPUnit- use lando phpunit
  behat:
    service: appserver
    description: run behat- use lando behat
    cmd: cd /app ; behat  # Run behat from the /app  directory
UnsettlingTrend
  • 452
  • 1
  • 5
  • 20
  • FYI, can't really tell what's the problem with Lando but you'll want to remove that `--templates http://templates/templates.json` section from the `command` field. – Tony Oct 02 '18 at 18:41
  • Oh, yeah. I'd done that locally. I'll update. Thanks! – UnsettlingTrend Oct 02 '18 at 19:31

1 Answers1

1

I had this problem when establishing AWS elasticsearch..

try the following in terminal:

docker network connect lando_bridge_network <container ID in error message>

More info: https://docs.docker.com/engine/reference/commandline/network_connect/#description

rook
  • 11
  • 1
  • Sorry for not clarifying: this command will manually establish the connection to the container ID. As long as you don't destroy or kill the containers, it should remain. During copy/paste, you may get an error about not fulfilling the connect arguments, just backspace the space and "k" in network in the code (in "lando_bridge_network), add them again, and paste the container (Had issue before so I thought I'd let you know as well). – rook Dec 20 '18 at 22:08
  • But, why its always showing when we do the lando rebuild. is there any way to fix this permanently? – Thirsty Six Jun 22 '22 at 08:01