Lando services are our distillation of Docker containers into their most important options combined with some special sauce to setup good networking, certificates and SSH keys as well as options to run build steps and provide low level overrides.
You can use the top-level
services config in your Landofile to define and configure a service.
Services will generally take the below form:
services: my-service: type: "my-type" api: 3 ...
my-service is the
name of the service and you can generally name the service whatever you want. We like short and kabob-cased names though.
api is the Service API version. If ommitted it will default to the app
However we highly recommend you do not omit it! 😃
type is the kind of service. By default Lando 3 has one type:
However, you can install plugins to get more
types such as
... denotes additional configuration options that can vary based on the
type of service you are using and other plugins you may have installed.
For these options you will want to consult the documentation for the specific service
api: 3 services are built on top of this service so it's worth examining its features as they are available in all other downstream services. Some of its key features are:
That said, it's almost always better to use one of the supported services below if you can.
The following services are currently supported. Please check out each one to learn how to use them.
Some other Lando plugins, such as the one that powers events will assume a default service in some scenarios although it is not clear how this is set or determined. So, this is how that is determined
- If there is a service called
appserver, as is the case in most recipes, then that will be the default service.
- If there is not a service called appserver, then the first service listed in your
.lando.ymlwill be the default service.
In Lando 4 you can choose the default service, now called the
primary service by setting
primary: true in that service.