Open kaszarobert opened 2 years ago
I solved this by using an environment override and defining the Docker container name as VARNISH_BACKEND_HOST
:
services:
varnish:
type: varnish:6
overrides:
environment:
VARNISH_BACKEND_HOST: <docker_container_name> # Like project_appserver_1
You're right. Specifying the container name does fix it. Thanks!
I'm experiencing an issue I don't have any idea how to solve it when working with the Drupal 9 recipe.
After lando poweroff if I start a site with Varnish, the Varnish can connect to the "appserver" as expected. But if I start another website that doesn't have Varnish, and only after that I try to start a site together with Varnish, visiting the site via Varnish, the page only shows this text: Bad Gateway
Running
lando logs -s varnish
shows this error:Why does Lando want to connect to a whole different project that happens to have an "appserver" service, too? I thought they are completely separated, no matter how many sites I'm starting with lando start.
This is how I include the varnish in the Landofile currently:
And this is the "default.vcl" I'm trying to use: