This services is a "catch all" service that allows power users to specify custom services that are not currently one of Lando's supported services. You can easily add it to your Lando app by adding an entry to the services top-level config in your Landofile.
Technically speaking, this service is just a way for a user to define a service directly using the Docker Compose V3 file format.
THIS MEANS THAT IT IS UP TO THE USER TO DEFINE A SERVICE CORRECTLY.
This service is useful if you are:
- Thinking about contributing your own custom Lando service and just want to prototype something
- Using Docker Compose config from other projects
- Need a service not currently provided by Lando itself
- Additional Reading
Unlike other services,
compose does not require a
version, instead it allows you to directly configure Docker Compose's top-level
services config directly.
We highly recommend you check the Docker Compose docs!
networks below come directly from Docker Compose so we highly recommend you check out their docs.
services: custom-service: type: compose services: image: drupal:8 # Required. See Below command: docker-php-entrypoint apache2-foreground ports: - '80' volumes: my-volume: networks: my-network:
Note that while
compose services also get the same Lando secret sauce but there is a notable difference here. By default Lando will hijack the Docker containers
entrypoint. This means if your custom container set's its own entrypoint you will need to remove that entrypoint and set it as the first argument in the
In the example above
docker-php-entrypoint is the default
entrypoint for the
drupal:8 image but we have moved it so that it is the first argument of
command. This both allows the container to run as expected and allows Lando to do its thing.
If you are interested in a working example of this service that we test on every Lando build then check out https://github.com/lando/lando/tree/master/examples/compose
- Updating your Landofiles to 3.0.0-rc.2+
- Accessing Your Services Externally
- Accessing Lando from Other Devices
- Exporting Databases
- Importing Databases
- Killer D8 Workflow with Platform.sh
- Lando + PhpStorm + Xdebug
- Offline Development
- Using $LANDO_INFO
- Using NodeJS Frontend Tooling
- Using Lando in Visual Studio Code
- Climbing a mountain for love
- SSH Keys
- Shared Files
- Global Config
- DNS Rebinding Protection
- File Uploads on Windows
- File Syncing Stalled
- Running VB and HyperV
- Running behind a proxy
- Switching Database Config